Trait ark_poly::polynomial::multivariate::Term[][src]

pub trait Term: Clone + PartialOrd + Ord + PartialEq + Eq + Hash + Default + Debug + Deref<Target = [(usize, usize)]> + Send + Sync + CanonicalSerialize + CanonicalDeserialize {
    fn new(term: Vec<(usize, usize)>) -> Self;
fn degree(&self) -> usize;
fn vars(&self) -> Vec<usize>;
fn powers(&self) -> Vec<usize>;
fn is_constant(&self) -> bool;
fn evaluate<F: Field>(&self, p: &[F]) -> F; }

Describes the interface for a term (monomial) of a multivariate polynomial.

Required methods

fn new(term: Vec<(usize, usize)>) -> Self[src]

Create a new Term from a list of tuples of the form (variable, power)

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

Returns the total degree of self. This is the sum of all variable powers in self

fn vars(&self) -> Vec<usize>[src]

Returns a list of variables in self

fn powers(&self) -> Vec<usize>[src]

Returns a list of the powers of each variable in self

fn is_constant(&self) -> bool[src]

Returns whether self is a constant

fn evaluate<F: Field>(&self, p: &[F]) -> F[src]

Evaluates self at the point p.

Loading content...

Implementors

impl Term for SparseTerm[src]

fn new(term: Vec<(usize, usize)>) -> Self[src]

Create a new Term from a list of tuples of the form (variable, power)

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

Returns the sum of all variable powers in self

fn vars(&self) -> Vec<usize>[src]

Returns a list of variables in self

fn powers(&self) -> Vec<usize>[src]

Returns a list of variable powers in self

fn is_constant(&self) -> bool[src]

Returns whether self is a constant

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

Evaluates self at the given point in the field.

Loading content...