pub struct EvaluationsVar<F: PrimeField> {
pub evals: Vec<FpVar<F>>,
pub lagrange_interpolator: Option<LagrangeInterpolator<F>>,
/* private fields */
}Expand description
Stores a UV polynomial in evaluation form.
Fields§
§evals: Vec<FpVar<F>>Evaluations of univariate polynomial over domain
lagrange_interpolator: Option<LagrangeInterpolator<F>>Optional Lagrange Interpolator. Useful for lagrange interpolation.
Implementations§
Source§impl<F: PrimeField> EvaluationsVar<F>
impl<F: PrimeField> EvaluationsVar<F>
Sourcepub fn from_vec_and_domain(
evaluations: Vec<FpVar<F>>,
domain: Radix2DomainVar<F>,
interpolate: bool,
) -> Self
pub fn from_vec_and_domain( evaluations: Vec<FpVar<F>>, domain: Radix2DomainVar<F>, interpolate: bool, ) -> Self
Construct Self from evaluations and a domain.
interpolate indicates if user wants to interpolate this polynomial
using lagrange interpolation.
Sourcepub fn generate_interpolation_cache(&mut self)
pub fn generate_interpolation_cache(&mut self)
Precompute necessary calculation for lagrange interpolation and mark it ready to interpolate
Sourcepub fn interpolate_and_evaluate(
&self,
interpolation_point: &FpVar<F>,
) -> Result<FpVar<F>, SynthesisError>
pub fn interpolate_and_evaluate( &self, interpolation_point: &FpVar<F>, ) -> Result<FpVar<F>, SynthesisError>
Returns constraints for Interpolating and evaluating at
interpolation_point
Trait Implementations§
Source§impl<'a, 'b, F: PrimeField> Add<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
impl<'a, 'b, F: PrimeField> Add<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
Source§type Output = EvaluationsVar<F>
type Output = EvaluationsVar<F>
+ operator.Source§impl<'a, F: PrimeField> AddAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
impl<'a, F: PrimeField> AddAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
Source§fn add_assign(&mut self, other: &'a EvaluationsVar<F>)
fn add_assign(&mut self, other: &'a EvaluationsVar<F>)
Performs the += operations, assuming domain.offset is equal.
Source§impl<F: Clone + PrimeField> Clone for EvaluationsVar<F>
impl<F: Clone + PrimeField> Clone for EvaluationsVar<F>
Source§fn clone(&self) -> EvaluationsVar<F>
fn clone(&self) -> EvaluationsVar<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a, 'b, F: PrimeField> Div<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
impl<'a, 'b, F: PrimeField> Div<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
Source§type Output = EvaluationsVar<F>
type Output = EvaluationsVar<F>
/ operator.Source§impl<'a, F: PrimeField> DivAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
impl<'a, F: PrimeField> DivAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
Source§fn div_assign(&mut self, other: &'a EvaluationsVar<F>)
fn div_assign(&mut self, other: &'a EvaluationsVar<F>)
Performs the /= operations, assuming domain.offset is equal.
Source§impl<'a, 'b, F: PrimeField> Mul<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
impl<'a, 'b, F: PrimeField> Mul<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
Source§fn mul(self, rhs: &'a EvaluationsVar<F>) -> Self::Output
fn mul(self, rhs: &'a EvaluationsVar<F>) -> Self::Output
Performs the * operations, assuming domain.offset is equal.
Source§type Output = EvaluationsVar<F>
type Output = EvaluationsVar<F>
* operator.Source§impl<'a, F: PrimeField> MulAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
impl<'a, F: PrimeField> MulAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
Source§fn mul_assign(&mut self, other: &'a EvaluationsVar<F>)
fn mul_assign(&mut self, other: &'a EvaluationsVar<F>)
Performs the *= operations, assuming domain.offset is equal.
Source§impl<'a, 'b, F: PrimeField> Sub<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
impl<'a, 'b, F: PrimeField> Sub<&'a EvaluationsVar<F>> for &'b EvaluationsVar<F>
Source§type Output = EvaluationsVar<F>
type Output = EvaluationsVar<F>
- operator.Source§impl<'a, F: PrimeField> SubAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
impl<'a, F: PrimeField> SubAssign<&'a EvaluationsVar<F>> for EvaluationsVar<F>
Source§fn sub_assign(&mut self, other: &'a EvaluationsVar<F>)
fn sub_assign(&mut self, other: &'a EvaluationsVar<F>)
Performs the -= operations, assuming domain.offset is equal.
Auto Trait Implementations§
impl<F> Freeze for EvaluationsVar<F>where
F: Freeze,
impl<F> !RefUnwindSafe for EvaluationsVar<F>
impl<F> !Send for EvaluationsVar<F>
impl<F> !Sync for EvaluationsVar<F>
impl<F> Unpin for EvaluationsVar<F>where
F: Unpin,
impl<F> !UnwindSafe for EvaluationsVar<F>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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