Struct ark_poly::polynomial::multivariate::SparsePolynomial [−][src]
Stores a sparse multivariate polynomial in coefficient form.
Fields
num_vars: usizeThe 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.
fn add(self, other: &'a SparsePolynomial<F, T>) -> SparsePolynomial<F, T>[src]
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.
fn add(self, other: SparsePolynomial<F, T>) -> Self[src]
impl<'a, 'b, F: Field, T: Term> AddAssign<&'a SparsePolynomial<F, T>> for SparsePolynomial<F, T>[src]
fn add_assign(&mut self, other: &'a SparsePolynomial<F, T>)[src]
impl<'a, 'b, F: Field, T: Term> AddAssign<(F, &'a SparsePolynomial<F, T>)> for SparsePolynomial<F, T>[src]
fn add_assign(&mut self, (f, other): (F, &'a SparsePolynomial<F, T>))[src]
impl<F: Field, T: Term> CanonicalDeserialize for SparsePolynomial<F, T>[src]
fn deserialize<R: Read>(reader: R) -> Result<Self, SerializationError>[src]
fn deserialize_uncompressed<R: Read>(
reader: R
) -> Result<Self, SerializationError>[src]
reader: R
) -> Result<Self, SerializationError>
fn deserialize_unchecked<R: Read>(reader: R) -> Result<Self, SerializationError>[src]
impl<F: Field, T: Term> CanonicalSerialize for SparsePolynomial<F, T>[src]
fn serialize<W: Write>(&self, writer: W) -> Result<(), SerializationError>[src]
fn serialized_size(&self) -> usize[src]
fn serialize_uncompressed<W: Write>(
&self,
writer: W
) -> Result<(), SerializationError>[src]
&self,
writer: W
) -> Result<(), SerializationError>
fn serialize_unchecked<W: Write>(
&self,
writer: W
) -> Result<(), SerializationError>[src]
&self,
writer: W
) -> Result<(), SerializationError>
fn uncompressed_size(&self) -> usize[src]
impl<F: Field, T: Term> Clone for SparsePolynomial<F, T> where
F: Clone,
T: Clone, [src]
F: Clone,
T: Clone,
fn clone(&self) -> Self[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[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]
F: Default,
T: Default,
impl<F: Field, T: Term> Eq for SparsePolynomial<F, T> where
F: Eq,
T: Eq, [src]
F: Eq,
T: Eq,
impl<F: Field, T: Term> Hash for SparsePolynomial<F, T> where
F: Hash,
T: Hash, [src]
F: Hash,
T: Hash,
fn hash<__HFT>(&self, __state: &mut __HFT) where
__HFT: Hasher, [src]
__HFT: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
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)
fn from_coefficients_slice(num_vars: usize, terms: &[(F, Self::Term)]) -> Self[src]
impl<F: Field, T: Term> Neg for SparsePolynomial<F, T>[src]
type Output = SparsePolynomial<F, T>
The resulting type after applying the - operator.
fn neg(self) -> SparsePolynomial<F, T>[src]
impl<F: Field, T: Term> PartialEq<SparsePolynomial<F, T>> for SparsePolynomial<F, T> where
F: PartialEq,
T: PartialEq, [src]
F: PartialEq,
T: PartialEq,
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.
fn sub(self, other: &'a SparsePolynomial<F, T>) -> SparsePolynomial<F, T>[src]
impl<'a, 'b, F: Field, T: Term> SubAssign<&'a SparsePolynomial<F, T>> for SparsePolynomial<F, T>[src]
fn sub_assign(&mut self, other: &'a SparsePolynomial<F, T>)[src]
impl<F: Field, T: Term> Zero for SparsePolynomial<F, T>[src]
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,
F: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CallHasher for T where
T: Hash + ?Sized,
T: Hash + ?Sized,
pub default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64 where
B: BuildHasher,
H: Hash + ?Sized,
B: BuildHasher,
H: Hash + ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,