pub struct ConstraintSetBuilder<F: Field> { /* private fields */ }
Expand description
A builder struct that turns individual compositions over oraclized multilinears into a set of
type erased IndexComposition
instances operating over a superset of oracles of all constraints.
Implementations§
Source§impl<F: Field> ConstraintSetBuilder<F>
impl<F: Field> ConstraintSetBuilder<F>
pub fn new() -> Self
pub fn add_sumcheck( &mut self, oracle_ids: impl IntoIterator<Item = OracleId>, composition: ArithExpr<F>, sum: F, )
pub fn add_zerocheck( &mut self, name: impl ToString, oracle_ids: impl IntoIterator<Item = OracleId>, composition: ArithExpr<F>, )
Sourcepub fn build_one(
self,
oracles: &MultilinearOracleSet<impl TowerField>,
) -> Result<ConstraintSet<F>, Error>
pub fn build_one( self, oracles: &MultilinearOracleSet<impl TowerField>, ) -> Result<ConstraintSet<F>, Error>
Build a single constraint set, requiring that all included oracle n_vars are the same
Sourcepub fn build(
self,
oracles: &MultilinearOracleSet<impl TowerField>,
) -> Result<Vec<ConstraintSet<F>>, Error>
pub fn build( self, oracles: &MultilinearOracleSet<impl TowerField>, ) -> Result<Vec<ConstraintSet<F>>, Error>
Create one ConstraintSet for every unique n_vars used.
Note that you can’t mix oracles with different n_vars in a single constraint.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for ConstraintSetBuilder<F>
impl<F> RefUnwindSafe for ConstraintSetBuilder<F>
impl<F> Send for ConstraintSetBuilder<F>
impl<F> Sync for ConstraintSetBuilder<F>
impl<F> Unpin for ConstraintSetBuilder<F>
impl<F> UnwindSafe for ConstraintSetBuilder<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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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