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;

    // Required methods
    fn degree(&self) -> usize;
    fn evaluate(&self, point: &Self::Point) -> F;
}
Expand description

Describes the common interface for univariate and multivariate polynomials

Required Associated Types§

source

type Point: Sized + Clone + Ord + Debug + Sync + Hash

The type of evaluation points for this polynomial.

Required Methods§

source

fn degree(&self) -> usize

Returns the total degree of the polynomial

source

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

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

Implementors§

source§

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

§

type Point = Vec<F, Global>

source§

impl<F: Field> Polynomial<F> for DensePolynomial<F>

§

type Point = F

source§

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

§

type Point = F