Struct ark_poly::polynomial::multivariate::SparsePolynomial[][src]

pub struct SparsePolynomial<F: Field, T: Term> {
    pub num_vars: usize,
    pub terms: Vec<(F, T)>,
}

Stores a sparse multivariate polynomial in coefficient form.

Fields

num_vars: usize

The number of variables the polynomial supports

terms: Vec<(F, T)>

List of each term along with its coefficient

Trait Implementations

impl<'a, 'b, F: Field, T: Term> Add<&'a SparsePolynomial<F, T>> for &'b SparsePolynomial<F, T>[src]

type Output = SparsePolynomial<F, T>

The resulting type after applying the + operator.

impl<F: Field, T: Term> Add<SparsePolynomial<F, T>> for SparsePolynomial<F, T>[src]

type Output = SparsePolynomial<F, T>

The resulting type after applying the + operator.

impl<'a, 'b, F: Field, T: Term> AddAssign<&'a SparsePolynomial<F, T>> for SparsePolynomial<F, T>[src]

impl<'a, 'b, F: Field, T: Term> AddAssign<(F, &'a SparsePolynomial<F, T>)> for SparsePolynomial<F, T>[src]

impl<F: Field, T: Term> CanonicalDeserialize for SparsePolynomial<F, T>[src]

impl<F: Field, T: Term> CanonicalSerialize for SparsePolynomial<F, T>[src]

impl<F: Field, T: Term> Clone for SparsePolynomial<F, T> where
    F: Clone,
    T: Clone
[src]

impl<F: Field, T: Term> Debug for SparsePolynomial<F, T>[src]

impl<F: Field, T: Term> Default for SparsePolynomial<F, T> where
    F: Default,
    T: Default
[src]

impl<F: Field, T: Term> Eq for SparsePolynomial<F, T> where
    F: Eq,
    T: Eq
[src]

impl<F: Field, T: Term> Hash for SparsePolynomial<F, T> where
    F: Hash,
    T: Hash
[src]

impl<F: Field> MVPolynomial<F> for SparsePolynomial<F, SparseTerm>[src]

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

Returns the number of variables in self

fn rand<R: Rng>(d: usize, l: usize, rng: &mut R) -> Self[src]

Outputs an l-variate polynomial which is the sum of l d-degree univariate polynomials where each coefficient is sampled uniformly at random.

type Term = SparseTerm

The type of the terms of self

fn from_coefficients_vec(num_vars: usize, terms: Vec<(F, SparseTerm)>) -> Self[src]

Constructs a new polynomial from a list of tuples of the form (coeff, Self::Term)

fn terms(&self) -> &[(F, Self::Term)][src]

Returns the terms of a self as a list of tuples of the form (coeff, Self::Term)

impl<F: Field, T: Term> Neg for SparsePolynomial<F, T>[src]

type Output = SparsePolynomial<F, T>

The resulting type after applying the - operator.

impl<F: Field, T: Term> PartialEq<SparsePolynomial<F, T>> for SparsePolynomial<F, T> where
    F: PartialEq,
    T: PartialEq
[src]

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

type Point = Vec<F>

The type of evaluation points for this polynomial.

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<'a, 'b, F: Field, T: Term> Sub<&'a SparsePolynomial<F, T>> for &'b SparsePolynomial<F, T>[src]

type Output = SparsePolynomial<F, T>

The resulting type after applying the - operator.

impl<'a, 'b, F: Field, T: Term> SubAssign<&'a SparsePolynomial<F, T>> for SparsePolynomial<F, T>[src]

impl<F: Field, T: Term> Zero for SparsePolynomial<F, T>[src]

fn zero() -> Self[src]

Returns the zero polynomial.

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

Checks if the given polynomial is zero.

Auto Trait Implementations

impl<F, T> Send for SparsePolynomial<F, T>

impl<F, T> Sync for SparsePolynomial<F, T>

impl<F, T> Unpin for SparsePolynomial<F, T> where
    F: Unpin,
    T: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash + ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,