pub struct Table<F: TowerField = B128> {
pub id: TableId,
pub name: String,
pub columns: Vec<ColumnInfo<F>>,
pub power_of_two_sized: bool,
/* private fields */
}
Expand description
A table in an M3 constraint system.
§Invariants
- All expressions in
zero_constraints
have a number of variables less than or equal to the number of table columns (the length ofcolumn_info
). - All flushes in
flushes
contain column indices less than the number of table columns (the length ofcolumn_info
).
Fields§
§id: TableId
§name: String
§columns: Vec<ColumnInfo<F>>
§power_of_two_sized: bool
Whether the table size is required to be a power of two.
Implementations§
Source§impl<F: TowerField> Table<F>
impl<F: TowerField> Table<F>
pub fn new(id: TableId, name: impl ToString) -> Self
pub fn id(&self) -> TableId
Sourcepub fn log_capacity(&self, table_size: usize) -> usize
pub fn log_capacity(&self, table_size: usize) -> usize
Returns the binary logarithm of the table capacity required to accommodate the given number of rows.
The table capacity must be a power of two (in order to be compatible with the multilinear proof system, which associates each table index with a vertex of a boolean hypercube). This will normally be the next power of two greater than the table size, but could require more padding to get a minimum capacity.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Table<F>
impl<F = BinaryField128b> !RefUnwindSafe for Table<F>
impl<F> Send for Table<F>
impl<F> Sync for Table<F>
impl<F> Unpin for Table<F>
impl<F = BinaryField128b> !UnwindSafe for Table<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