Struct snarkvm_wasm::SparsePolynomial [−][src]
Stores a sparse polynomial in coefficient form.
Fields
coeffs: Vec<(usize, F), Global>The coefficient a_i of x^i is stored as (i, a_i) in self.coeffs.
the entries in self.coeffs are sorted in increasing order of i.
Implementations
impl<F> SparsePolynomial<F> where
F: Field, [src]
F: Field,
pub fn zero() -> SparsePolynomial<F>[src]
Returns the zero polynomial.
pub fn is_zero(&self) -> bool[src]
Checks if the given polynomial is zero.
pub fn from_coefficients_slice(coeffs: &[(usize, F)]) -> SparsePolynomial<F>[src]
Constructs a new polynomial from a list of coefficients.
pub fn from_coefficients_vec(
coeffs: Vec<(usize, F), Global>
) -> SparsePolynomial<F>[src]
coeffs: Vec<(usize, F), Global>
) -> SparsePolynomial<F>
Constructs a new polynomial from a list of coefficients.
pub fn degree(&self) -> usize[src]
Returns the degree of the polynomial.
pub fn evaluate(&self, point: F) -> F[src]
Evaluates self at the given point in the field.
pub fn mul(&self, other: &SparsePolynomial<F>) -> SparsePolynomial<F>[src]
Perform a naive n^2 multiplicatoin of self by other.
impl<F> SparsePolynomial<F> where
F: PrimeField, [src]
F: PrimeField,
pub fn evaluate_over_domain_by_ref(
&self,
domain: EvaluationDomain<F>
) -> Evaluations<F>[src]
&self,
domain: EvaluationDomain<F>
) -> Evaluations<F>
Evaluate self over domain.
pub fn evaluate_over_domain(self, domain: EvaluationDomain<F>) -> Evaluations<F>[src]
Evaluate self over domain.
Trait Implementations
impl<F> CanonicalDeserialize for SparsePolynomial<F> where
F: Field, [src]
F: Field,
pub fn deserialize<R>(
reader: &mut R
) -> Result<SparsePolynomial<F>, SerializationError> where
R: Read, [src]
reader: &mut R
) -> Result<SparsePolynomial<F>, SerializationError> where
R: Read,
pub fn deserialize_uncompressed<R>(
reader: &mut R
) -> Result<SparsePolynomial<F>, SerializationError> where
R: Read, [src]
reader: &mut R
) -> Result<SparsePolynomial<F>, SerializationError> where
R: Read,
impl<F> CanonicalSerialize for SparsePolynomial<F> where
F: Field, [src]
F: Field,
pub fn serialize<W>(&self, writer: &mut W) -> Result<(), SerializationError> where
W: Write, [src]
W: Write,
pub fn serialized_size(&self) -> usize[src]
pub fn serialize_uncompressed<W>(
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write, [src]
&self,
writer: &mut W
) -> Result<(), SerializationError> where
W: Write,
pub fn uncompressed_size(&self) -> usize[src]
impl<F> Clone for SparsePolynomial<F> where
F: Clone + Field, [src]
F: Clone + Field,
pub fn clone(&self) -> SparsePolynomial<F>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<F> Debug for SparsePolynomial<F> where
F: Field, [src]
F: Field,
impl<F> Default for SparsePolynomial<F> where
F: Default + Field, [src]
F: Default + Field,
pub fn default() -> SparsePolynomial<F>[src]
impl<F> Eq for SparsePolynomial<F> where
F: Eq + Field, [src]
F: Eq + Field,
impl<'a, F> From<&'a SparsePolynomial<F>> for DenseOrSparsePolynomial<'a, F> where
F: Field, [src]
F: Field,
pub fn from(other: &'a SparsePolynomial<F>) -> DenseOrSparsePolynomial<'a, F>[src]
impl<'_, F> From<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F> where
F: Field, [src]
F: Field,
pub fn from(other: SparsePolynomial<F>) -> DenseOrSparsePolynomial<'_, F>[src]
impl<F> Hash for SparsePolynomial<F> where
F: Hash + Field, [src]
F: Hash + Field,
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl<F> Into<DensePolynomial<F>> for SparsePolynomial<F> where
F: Field, [src]
F: Field,
pub fn into(self) -> DensePolynomial<F>[src]
impl<F> PartialEq<SparsePolynomial<F>> for SparsePolynomial<F> where
F: PartialEq<F> + Field, [src]
F: PartialEq<F> + Field,
pub fn eq(&self, other: &SparsePolynomial<F>) -> bool[src]
pub fn ne(&self, other: &SparsePolynomial<F>) -> bool[src]
impl<F> StructuralEq for SparsePolynomial<F> where
F: Field, [src]
F: Field,
impl<F> StructuralPartialEq for SparsePolynomial<F> where
F: Field, [src]
F: Field,
impl<'_, F> TryInto<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F> where
F: Field, [src]
F: Field,
Auto Trait Implementations
impl<F> RefUnwindSafe for SparsePolynomial<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for SparsePolynomial<F>
impl<F> Sync for SparsePolynomial<F>
impl<F> Unpin for SparsePolynomial<F> where
F: Unpin,
F: Unpin,
impl<F> UnwindSafe for SparsePolynomial<F> where
F: UnwindSafe,
F: UnwindSafe,
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,