Trait Polynomial

Source
pub trait Polynomial<F>:
    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>
where F: Field,
{ type Point: 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: 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<F> Polynomial<F> for DenseMultilinearExtension<F>
where F: Field,

Source§

type Point = Vec<F>

Source§

impl<F> Polynomial<F> for SparseMultilinearExtension<F>
where F: Field,

Source§

type Point = Vec<F>

Source§

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

Source§

type Point = Vec<F>

Source§

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

Source§

type Point = F

Source§

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

Source§

type Point = F