Struct snarkvm_algorithms::fft::evaluations::Evaluations
source · pub struct Evaluations<F: PrimeField> {
pub evaluations: Vec<F>,
/* private fields */
}
Expand description
Stores a polynomial in evaluation form.
Fields
evaluations: Vec<F>
The evaluations of a polynomial over the domain D
Implementations
sourceimpl<F: PrimeField> Evaluations<F>
impl<F: PrimeField> Evaluations<F>
sourcepub fn from_vec_and_domain(
evaluations: Vec<F>,
domain: EvaluationDomain<F>
) -> Self
pub fn from_vec_and_domain(
evaluations: Vec<F>,
domain: EvaluationDomain<F>
) -> Self
Construct Self
from evaluations and a domain.
sourcepub fn interpolate_by_ref(&self) -> DensePolynomial<F>
pub fn interpolate_by_ref(&self) -> DensePolynomial<F>
Interpolate a polynomial from a list of evaluations
sourcepub fn interpolate_with_pc_by_ref(
&self,
pc: &IFFTPrecomputation<F>
) -> DensePolynomial<F>
pub fn interpolate_with_pc_by_ref(
&self,
pc: &IFFTPrecomputation<F>
) -> DensePolynomial<F>
Interpolate a polynomial from a list of evaluations
sourcepub fn interpolate(self) -> DensePolynomial<F>
pub fn interpolate(self) -> DensePolynomial<F>
Interpolate a polynomial from a list of evaluations
sourcepub fn interpolate_with_pc(
self,
pc: &IFFTPrecomputation<F>
) -> DensePolynomial<F>
pub fn interpolate_with_pc(
self,
pc: &IFFTPrecomputation<F>
) -> DensePolynomial<F>
Interpolate a polynomial from a list of evaluations
pub fn domain(&self) -> EvaluationDomain<F>
pub fn evaluate(&self, point: &F) -> F
pub fn evaluate_with_coeffs(&self, lagrange_coefficients_at_point: &[F]) -> F
Trait Implementations
sourceimpl<'a, 'b, F: PrimeField> Add<&'a Evaluations<F>> for &'b Evaluations<F>
impl<'a, 'b, F: PrimeField> Add<&'a Evaluations<F>> for &'b Evaluations<F>
type Output = Evaluations<F>
type Output = Evaluations<F>
The resulting type after applying the
+
operator.sourcefn add(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn add(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
+
operation. Read moresourceimpl<'a, F: PrimeField> AddAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> AddAssign<&'a Evaluations<F>> for Evaluations<F>
sourcefn add_assign(&mut self, other: &'a Evaluations<F>)
fn add_assign(&mut self, other: &'a Evaluations<F>)
Performs the
+=
operation. Read moresourceimpl<F: PrimeField> CanonicalDeserialize for Evaluations<F>
impl<F: PrimeField> CanonicalDeserialize for Evaluations<F>
fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R
) -> Result<Self, SerializationError>where
R: Read,
sourceimpl<F: PrimeField> CanonicalSerialize for Evaluations<F>
impl<F: PrimeField> CanonicalSerialize for Evaluations<F>
fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
sourceimpl<F: Clone + PrimeField> Clone for Evaluations<F>
impl<F: Clone + PrimeField> Clone for Evaluations<F>
sourcefn clone(&self) -> Evaluations<F>
fn clone(&self) -> Evaluations<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<F: Debug + PrimeField> Debug for Evaluations<F>
impl<F: Debug + PrimeField> Debug for Evaluations<F>
sourceimpl<'a, 'b, F: PrimeField> Div<&'a Evaluations<F>> for &'b Evaluations<F>
impl<'a, 'b, F: PrimeField> Div<&'a Evaluations<F>> for &'b Evaluations<F>
type Output = Evaluations<F>
type Output = Evaluations<F>
The resulting type after applying the
/
operator.sourcefn div(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn div(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
/
operation. Read moresourceimpl<'a, F: PrimeField> DivAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> DivAssign<&'a Evaluations<F>> for Evaluations<F>
sourcefn div_assign(&mut self, other: &'a Evaluations<F>)
fn div_assign(&mut self, other: &'a Evaluations<F>)
Performs the
/=
operation. Read moresourceimpl<F: Hash + PrimeField> Hash for Evaluations<F>
impl<F: Hash + PrimeField> Hash for Evaluations<F>
sourceimpl<F: PrimeField> Index<usize> for Evaluations<F>
impl<F: PrimeField> Index<usize> for Evaluations<F>
sourceimpl<'a, 'b, F: PrimeField> Mul<&'a Evaluations<F>> for &'b Evaluations<F>
impl<'a, 'b, F: PrimeField> Mul<&'a Evaluations<F>> for &'b Evaluations<F>
type Output = Evaluations<F>
type Output = Evaluations<F>
The resulting type after applying the
*
operator.sourcefn mul(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn mul(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
*
operation. Read moresourceimpl<'a, F: PrimeField> MulAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> MulAssign<&'a Evaluations<F>> for Evaluations<F>
sourcefn mul_assign(&mut self, other: &'a Evaluations<F>)
fn mul_assign(&mut self, other: &'a Evaluations<F>)
Performs the
*=
operation. Read moresourceimpl<F: PartialEq + PrimeField> PartialEq<Evaluations<F>> for Evaluations<F>
impl<F: PartialEq + PrimeField> PartialEq<Evaluations<F>> for Evaluations<F>
sourcefn eq(&self, other: &Evaluations<F>) -> bool
fn eq(&self, other: &Evaluations<F>) -> bool
sourceimpl<'a, 'b, F: PrimeField> Sub<&'a Evaluations<F>> for &'b Evaluations<F>
impl<'a, 'b, F: PrimeField> Sub<&'a Evaluations<F>> for &'b Evaluations<F>
type Output = Evaluations<F>
type Output = Evaluations<F>
The resulting type after applying the
-
operator.sourcefn sub(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn sub(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
-
operation. Read moresourceimpl<'a, F: PrimeField> SubAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> SubAssign<&'a Evaluations<F>> for Evaluations<F>
sourcefn sub_assign(&mut self, other: &'a Evaluations<F>)
fn sub_assign(&mut self, other: &'a Evaluations<F>)
Performs the
-=
operation. Read moresourceimpl<F: PrimeField> Valid for Evaluations<F>
impl<F: PrimeField> Valid for Evaluations<F>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>(
batch: impl Iterator<Item = &'a Self> + Send
) -> Result<(), SerializationError>where
Self: 'a,
impl<F: Eq + PrimeField> Eq for Evaluations<F>
impl<F: PrimeField> StructuralEq for Evaluations<F>
impl<F: PrimeField> StructuralPartialEq for Evaluations<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for Evaluations<F>where
F: RefUnwindSafe,
impl<F> Send for Evaluations<F>
impl<F> Sync for Evaluations<F>
impl<F> Unpin for Evaluations<F>where
F: Unpin,
impl<F> UnwindSafe for Evaluations<F>where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.