pub struct NatEvaluatedPoly<F> {
pub evaluations: Vec<F>,
}Expand description
Polynomial evaluated on 0, 1, 2, ….
Fields§
§evaluations: Vec<F>Evaluations on P(0), P(1), P(2), …
Implementations§
Trait Implementations§
Source§impl<F: Clone> Clone for NatEvaluatedPoly<F>
impl<F: Clone> Clone for NatEvaluatedPoly<F>
Source§fn clone(&self) -> NatEvaluatedPoly<F>
fn clone(&self) -> NatEvaluatedPoly<F>
Returns a duplicate 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> Debug for NatEvaluatedPoly<F>
impl<F: Debug> Debug for NatEvaluatedPoly<F>
Source§impl<F: FromPrimitiveWithConfig> EvaluatablePolynomial<F, F> for NatEvaluatedPoly<F>
impl<F: FromPrimitiveWithConfig> EvaluatablePolynomial<F, F> for NatEvaluatedPoly<F>
Source§fn evaluate_at_point(
&self,
point: &Self::EvaluationPoint,
) -> Result<F, EvaluationError>
fn evaluate_at_point( &self, point: &Self::EvaluationPoint, ) -> Result<F, EvaluationError>
Interpolate the unique univariate polynomial of degree at most
evaluations.len()-1 passing through the y-values in evaluations at x
= 0,…, evaluations.len()-1
and evaluate this polynomial at point. In other words, efficiently
compute $\sum_{i=0}^{len\ evaluations - 1} evaluations[i] *
(\prod_{j!=i} (\text{point} - j)/(i-j))$.
Source§type EvaluationPoint = F
type EvaluationPoint = F
The type of points a polynomial can be evaluated on.
For univariate polynomials this typically is
Out,
for multivariate this is [Out].Source§impl<F: PartialEq> PartialEq for NatEvaluatedPoly<F>
impl<F: PartialEq> PartialEq for NatEvaluatedPoly<F>
Source§impl<F: Clone> Polynomial<F> for NatEvaluatedPoly<F>
impl<F: Clone> Polynomial<F> for NatEvaluatedPoly<F>
const DEGREE_BOUND: usize = usize::MAX
impl<F> StructuralPartialEq for NatEvaluatedPoly<F>
Auto Trait Implementations§
impl<F> Freeze for NatEvaluatedPoly<F>
impl<F> RefUnwindSafe for NatEvaluatedPoly<F>where
F: RefUnwindSafe,
impl<F> Send for NatEvaluatedPoly<F>where
F: Send,
impl<F> Sync for NatEvaluatedPoly<F>where
F: Sync,
impl<F> Unpin for NatEvaluatedPoly<F>where
F: Unpin,
impl<F> UnsafeUnpin for NatEvaluatedPoly<F>
impl<F> UnwindSafe for NatEvaluatedPoly<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more