Trait ark_poly::polynomial::Polynomial[][src]

pub trait Polynomial<F: Field>: Sized + Clone + Debug + Hash + PartialEq + Eq + Add + Neg + Zero + CanonicalSerialize + CanonicalDeserialize + for<'a> AddAssign<&'a Self> + for<'a> AddAssign<(F, &'a Self)> + for<'a> SubAssign<&'a Self> {
    type Point: Sized + Clone + Ord + Debug + Sync + Hash;
    fn degree(&self) -> usize;
fn evaluate(&self, point: &Self::Point) -> F; }

Describes the common interface for univariate and multivariate polynomials

Associated Types

type Point: Sized + Clone + Ord + Debug + Sync + Hash[src]

The type of evaluation points for this polynomial.

Loading content...

Required methods

fn degree(&self) -> usize[src]

Returns the total degree of the polynomial

fn evaluate(&self, point: &Self::Point) -> F[src]

Evaluates self at the given point in Self::Point.

Loading content...

Implementors

impl<F: Field> Polynomial<F> for ark_poly::polynomial::multivariate::SparsePolynomial<F, SparseTerm>[src]

type Point = Vec<F>

fn degree(&self) -> usize[src]

Returns the total degree of the polynomial

fn evaluate(&self, point: &Vec<F>) -> F[src]

Evaluates self at the given point in Self::Point.

impl<F: Field> Polynomial<F> for DensePolynomial<F>[src]

type Point = F

fn degree(&self) -> usize[src]

Returns the total degree of the polynomial

fn evaluate(&self, point: &F) -> F[src]

Evaluates self at the given point in Self::Point.

impl<F: Field> Polynomial<F> for ark_poly::polynomial::univariate::SparsePolynomial<F>[src]

type Point = F

fn degree(&self) -> usize[src]

Returns the degree of the polynomial.

fn evaluate(&self, point: &F) -> F[src]

Evaluates self at the given point in the field.

Loading content...