pub struct Witness<F: Field> { /* private fields */ }Expand description
Owns the source tables together with the stacked committed polynomial.
Implementations§
Source§impl<F: Field> Witness<F>
impl<F: Field> Witness<F>
Sourcepub fn new(tables: Vec<Table<F>>, folding: usize) -> Self
pub fn new(tables: Vec<Table<F>>, folding: usize) -> Self
Stacks the given tables into a single committed polynomial.
§Algorithm
- Sort tables by arity ascending; reverse-iterate to place largest first.
- Each column occupies one slot of size
2^arity. - Selector bit-width equals the stacked arity minus the table arity.
- Total stacked size is rounded up to the next power of two.
- Unused tail entries stay zero.
§Panics
- Table list must be non-empty.
- Tables below the preprocessing depth are zero-padded to that depth.
Sourcepub fn new_interleaved(tables: Vec<Table<F>>, folding: usize) -> Self
pub fn new_interleaved(tables: Vec<Table<F>>, folding: usize) -> Self
Stacks the given tables with local variables before selector variables.
§Layout
Current new stores each column contiguously as:
P(selector_bits, local_bits)This constructor stores each column strided by selector bits as:
P(local_bits, selector_bits)Local table evaluation order is preserved. Only selector bitstrings are reversed from the prefix-oriented planner so mixed-arity selector codes remain suffix-disjoint.
§Panics
- Table list must be non-empty.
- Tables below the preprocessing depth are zero-padded to that depth.
Sourcepub const fn num_variables(&self) -> usize
pub const fn num_variables(&self) -> usize
Returns the number of variables of the stacked polynomial.
Sourcepub fn table_shapes(&self) -> Vec<TableShape>
pub fn table_shapes(&self) -> Vec<TableShape>
Returns verifier table shapes after witness normalization/padding.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Witness<F>
impl<F> RefUnwindSafe for Witness<F>where
F: RefUnwindSafe,
impl<F> Send for Witness<F>
impl<F> Sync for Witness<F>
impl<F> Unpin for Witness<F>where
F: Unpin,
impl<F> UnsafeUnpin for Witness<F>
impl<F> UnwindSafe for Witness<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§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