pub struct VanishingPolynomial<F: Field> {
pub constant_term: F,
pub dim_h: u64,
pub order_h: u64,
}
Expand description
Struct describing vanishing polynomial for a multiplicative coset H where |H| is a power of 2. As H is a coset, every element can be described as h*g^i and therefore has vanishing polynomial Z_H(x) = x^|H| - h^|H|
Fields§
§constant_term: F
h^|H|
dim_h: u64
log_2(|H|)
order_h: u64
|H|
Implementations§
Source§impl<F: PrimeField> VanishingPolynomial<F>
impl<F: PrimeField> VanishingPolynomial<F>
Sourcepub fn evaluate(&self, x: &F) -> F
pub fn evaluate(&self, x: &F) -> F
Evaluates the vanishing polynomial without generating the constraints.
Sourcepub fn evaluate_constraints(
&self,
x: &FpVar<F>,
) -> Result<FpVar<F>, SynthesisError>
pub fn evaluate_constraints( &self, x: &FpVar<F>, ) -> Result<FpVar<F>, SynthesisError>
Evaluates the constraints and just gives you the gadget for the result. Caution for use in holographic lincheck: The output has 2 entries in one matrix
Trait Implementations§
Source§impl<F: Clone + Field> Clone for VanishingPolynomial<F>
impl<F: Clone + Field> Clone for VanishingPolynomial<F>
Source§fn clone(&self) -> VanishingPolynomial<F>
fn clone(&self) -> VanishingPolynomial<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 moreAuto Trait Implementations§
impl<F> Freeze for VanishingPolynomial<F>where
F: Freeze,
impl<F> RefUnwindSafe for VanishingPolynomial<F>where
F: RefUnwindSafe,
impl<F> Send for VanishingPolynomial<F>
impl<F> Sync for VanishingPolynomial<F>
impl<F> Unpin for VanishingPolynomial<F>where
F: Unpin,
impl<F> UnwindSafe for VanishingPolynomial<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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
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