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§
source§impl<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
sourcepub fn evaluations(&self) -> &[F]
pub fn evaluations(&self) -> &[F]
Returns the evaluations of self
.
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§
source§impl<'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.source§fn add(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn add(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
+
operation. Read moresource§impl<'a, F: PrimeField> AddAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> AddAssign<&'a Evaluations<F>> for Evaluations<F>
source§fn add_assign(&mut self, other: &'a Evaluations<F>)
fn add_assign(&mut self, other: &'a Evaluations<F>)
Performs the
+=
operation. Read moresource§impl<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,
source§impl<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
source§impl<F: Clone + PrimeField> Clone for Evaluations<F>
impl<F: Clone + PrimeField> Clone for Evaluations<F>
source§fn clone(&self) -> Evaluations<F>
fn clone(&self) -> Evaluations<F>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F: Debug + PrimeField> Debug for Evaluations<F>
impl<F: Debug + PrimeField> Debug for Evaluations<F>
source§impl<'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.source§fn div(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn div(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
/
operation. Read moresource§impl<'a, F: PrimeField> DivAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> DivAssign<&'a Evaluations<F>> for Evaluations<F>
source§fn div_assign(&mut self, other: &'a Evaluations<F>)
fn div_assign(&mut self, other: &'a Evaluations<F>)
Performs the
/=
operation. Read moresource§impl<F: Hash + PrimeField> Hash for Evaluations<F>
impl<F: Hash + PrimeField> Hash for Evaluations<F>
source§impl<F: PrimeField> Index<usize> for Evaluations<F>
impl<F: PrimeField> Index<usize> for Evaluations<F>
source§impl<'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.source§fn mul(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn mul(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
*
operation. Read moresource§impl<'a, F: PrimeField> MulAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> MulAssign<&'a Evaluations<F>> for Evaluations<F>
source§fn mul_assign(&mut self, other: &'a Evaluations<F>)
fn mul_assign(&mut self, other: &'a Evaluations<F>)
Performs the
*=
operation. Read moresource§impl<F: PartialEq + PrimeField> PartialEq for Evaluations<F>
impl<F: PartialEq + PrimeField> PartialEq for Evaluations<F>
source§fn eq(&self, other: &Evaluations<F>) -> bool
fn eq(&self, other: &Evaluations<F>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'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.source§fn sub(self, other: &'a Evaluations<F>) -> Evaluations<F>
fn sub(self, other: &'a Evaluations<F>) -> Evaluations<F>
Performs the
-
operation. Read moresource§impl<'a, F: PrimeField> SubAssign<&'a Evaluations<F>> for Evaluations<F>
impl<'a, F: PrimeField> SubAssign<&'a Evaluations<F>> for Evaluations<F>
source§fn sub_assign(&mut self, other: &'a Evaluations<F>)
fn sub_assign(&mut self, other: &'a Evaluations<F>)
Performs the
-=
operation. Read moresource§impl<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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.