pub enum VariableOrder {
Prefix,
Suffix,
}Expand description
Which side of the variable order is bound first by the sumcheck rounds.
§Role
- Round-coefficient math differs in which axis is summed over.
- Variable binding differs in which coordinate is fixed to the challenge.
- Verifier constraint evaluation differs in how the final challenge is spliced.
All three dispatches go through inherent methods below, so the runtime branch sits in the outer frame and never inside the O(2^n) inner loops.
Variants§
Prefix
Prefix variables are bound first (round i binds X_i).
Suffix
Suffix variables are bound first (round i binds X_{n-i}).
Implementations§
Source§impl VariableOrder
impl VariableOrder
Sourcepub fn sumcheck_coefficients<B, A>(self, evals: &[B], weights: &[A]) -> (A, A)
pub fn sumcheck_coefficients<B, A>(self, evals: &[B], weights: &[A]) -> (A, A)
Computes (h(0), h(inf)) for one quadratic sumcheck round.
Sourcepub fn fix_var<A, Ch>(self, poly: &mut Poly<A>, r: Ch)
pub fn fix_var<A, Ch>(self, poly: &mut Poly<A>, r: Ch)
Binds the active round variable of poly to challenge r.
Sourcepub fn eval_constraints_poly<F, EF>(
self,
constraints: &[Constraint<F, EF>],
challenge: &Point<EF>,
) -> EFwhere
F: Field,
EF: ExtensionField<F>,
pub fn eval_constraints_poly<F, EF>(
self,
constraints: &[Constraint<F, EF>],
challenge: &Point<EF>,
) -> EFwhere
F: Field,
EF: ExtensionField<F>,
Evaluates the batched verifier constraints at the final challenge point.
§Slicing rule
- Prefix binding folds variables low-to-high, so each constraint sees
the last
koriginal variables of the challenge. - Suffix binding folds variables high-to-low, so each constraint sees
the last
koriginal variables of the challenge, reversed.
Trait Implementations§
Source§impl Clone for VariableOrder
impl Clone for VariableOrder
Source§fn clone(&self) -> VariableOrder
fn clone(&self) -> VariableOrder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VariableOrder
Source§impl Debug for VariableOrder
impl Debug for VariableOrder
impl Eq for VariableOrder
Source§impl PartialEq for VariableOrder
impl PartialEq for VariableOrder
Source§fn eq(&self, other: &VariableOrder) -> bool
fn eq(&self, other: &VariableOrder) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VariableOrder
Auto Trait Implementations§
impl Freeze for VariableOrder
impl RefUnwindSafe for VariableOrder
impl Send for VariableOrder
impl Sync for VariableOrder
impl Unpin for VariableOrder
impl UnsafeUnpin for VariableOrder
impl UnwindSafe for VariableOrder
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> 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