pub struct ConstraintSystem<F: TowerField = B128> {
pub tables: Vec<Table<F>>,
pub channels: Vec<Channel>,
}
Expand description
An M3 constraint system, independent of the table sizes.
Fields§
§tables: Vec<Table<F>>
§channels: Vec<Channel>
Implementations§
Source§impl<F: TowerField> ConstraintSystem<F>
impl<F: TowerField> ConstraintSystem<F>
pub fn new() -> Self
pub fn add_table(&mut self, name: impl ToString) -> TableBuilder<'_, F>
pub fn add_channel(&mut self, name: impl ToString) -> ChannelId
Sourcepub fn build_witness<'cs, 'alloc, P: PackedField<Scalar = F>>(
&'cs self,
allocator: &'alloc Bump,
) -> WitnessIndex<'cs, 'alloc, P>
pub fn build_witness<'cs, 'alloc, P: PackedField<Scalar = F>>( &'cs self, allocator: &'alloc Bump, ) -> WitnessIndex<'cs, 'alloc, P>
Creates and allocates the witness index.
Deprecated: This is a thin wrapper over WitnessIndex::new
now, which is preferred.
Sourcepub fn compile(
&self,
statement: &Statement<F>,
) -> Result<CompiledConstraintSystem<F>, Error>
pub fn compile( &self, statement: &Statement<F>, ) -> Result<CompiledConstraintSystem<F>, Error>
Compiles a CompiledConstraintSystem
for a particular statement.
The most important transformation that takes place in this step is creating multilinear
oracles for all columns. The main difference between column definitions and oracle
definitions is that multilinear oracle definitions have a number of variables, whereas the
column definitions contained in a ConstraintSystem
do not have size information.
Trait Implementations§
Source§impl<F: Debug + TowerField> Debug for ConstraintSystem<F>
impl<F: Debug + TowerField> Debug for ConstraintSystem<F>
Source§impl<F: Default + TowerField> Default for ConstraintSystem<F>
impl<F: Default + TowerField> Default for ConstraintSystem<F>
Source§fn default() -> ConstraintSystem<F>
fn default() -> ConstraintSystem<F>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<F> Freeze for ConstraintSystem<F>
impl<F = BinaryField128b> !RefUnwindSafe for ConstraintSystem<F>
impl<F> Send for ConstraintSystem<F>
impl<F> Sync for ConstraintSystem<F>
impl<F> Unpin for ConstraintSystem<F>
impl<F = BinaryField128b> !UnwindSafe for ConstraintSystem<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