Struct snarkvm_algorithms::fft::SparsePolynomial [−][src]
Stores a sparse polynomial in coefficient form.
Fields
coeffs: Vec<(usize, F)>
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: Field> SparsePolynomial<F>
[src]
pub fn zero() -> Self
[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)]) -> Self
[src]
Constructs a new polynomial from a list of coefficients.
pub fn from_coefficients_vec(mut coeffs: Vec<(usize, F)>) -> Self
[src]
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: &Self) -> Self
[src]
Perform a naive n^2 multiplicatoin of self
by other
.
impl<F: PrimeField> SparsePolynomial<F>
[src]
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: Field> CanonicalDeserialize for SparsePolynomial<F>
[src]
fn deserialize<R: Read>(reader: &mut R) -> Result<Self, SerializationError>
[src]
fn deserialize_uncompressed<R: Read>(
reader: &mut R
) -> Result<Self, SerializationError>
[src]
reader: &mut R
) -> Result<Self, SerializationError>
impl<F: Field> CanonicalSerialize for SparsePolynomial<F>
[src]
fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), SerializationError>
[src]
fn serialized_size(&self) -> usize
[src]
fn serialize_uncompressed<W: Write>(
&self,
writer: &mut W
) -> Result<(), SerializationError>
[src]
&self,
writer: &mut W
) -> Result<(), SerializationError>
fn uncompressed_size(&self) -> usize
[src]
impl<F: Clone + Field> Clone for SparsePolynomial<F>
[src]
fn clone(&self) -> SparsePolynomial<F>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<F: Field> Debug for SparsePolynomial<F>
[src]
impl<F: Default + Field> Default for SparsePolynomial<F>
[src]
fn default() -> SparsePolynomial<F>
[src]
impl<F: Eq + Field> Eq for SparsePolynomial<F>
[src]
impl<'a, F: Field> From<&'a SparsePolynomial<F>> for DenseOrSparsePolynomial<'a, F>
[src]
fn from(other: &'a SparsePolynomial<F>) -> Self
[src]
impl<F: Field> From<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
[src]
fn from(other: SparsePolynomial<F>) -> Self
[src]
impl<F: Hash + Field> Hash for SparsePolynomial<F>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<F: Field> Into<DensePolynomial<F>> for SparsePolynomial<F>
[src]
fn into(self) -> DensePolynomial<F>
[src]
impl<F: PartialEq + Field> PartialEq<SparsePolynomial<F>> for SparsePolynomial<F>
[src]
fn eq(&self, other: &SparsePolynomial<F>) -> bool
[src]
fn ne(&self, other: &SparsePolynomial<F>) -> bool
[src]
impl<F: Field> StructuralEq for SparsePolynomial<F>
[src]
impl<F: Field> StructuralPartialEq for SparsePolynomial<F>
[src]
impl<F: Field> TryInto<SparsePolynomial<F>> for DenseOrSparsePolynomial<'_, F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for SparsePolynomial<F> where
F: RefUnwindSafe,
[src]
F: RefUnwindSafe,
impl<F> Send for SparsePolynomial<F>
[src]
impl<F> Sync for SparsePolynomial<F>
[src]
impl<F> Unpin for SparsePolynomial<F> where
F: Unpin,
[src]
F: Unpin,
impl<F> UnwindSafe for SparsePolynomial<F> where
F: UnwindSafe,
[src]
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>,