Struct triton_vm::table::master_table::MasterBaseTable
source · pub struct MasterBaseTable {
pub num_trace_randomizers: usize,
/* private fields */
}Expand description
See MasterTable.
Fields§
§num_trace_randomizers: usizeImplementations§
source§impl MasterBaseTable
impl MasterBaseTable
pub fn new( aet: &AlgebraicExecutionTrace, num_trace_randomizers: usize, quotient_domain: ArithmeticDomain, fri_domain: ArithmeticDomain ) -> Self
sourcepub fn pad(&mut self)
pub fn pad(&mut self)
Pad the trace to the next power of two using the various, table-specific padding rules. All tables must have the same height for reasons of verifier efficiency. Furthermore, that height must be a power of two for reasons of prover efficiency. Concretely, the Number Theory Transform (NTT) performed by the prover is particularly efficient over the used base field when the number of rows is a power of two.
sourcepub fn extend(&self, challenges: &Challenges) -> MasterExtTable
pub fn extend(&self, challenges: &Challenges) -> MasterExtTable
Create a MasterExtTable from a MasterBaseTable by .extend()ing each individual base
table. The .extend() for each table is specific to that table, but always involves
adding some number of columns.
sourcepub fn table(&self, table_id: TableId) -> ArrayView2<'_, BFieldElement>
pub fn table(&self, table_id: TableId) -> ArrayView2<'_, BFieldElement>
A view of the specified table, without any randomizers.
sourcepub fn table_mut(
&mut self,
table_id: TableId
) -> ArrayViewMut2<'_, BFieldElement>
pub fn table_mut( &mut self, table_id: TableId ) -> ArrayViewMut2<'_, BFieldElement>
A mutable view of the specified table, without any randomizers.
Trait Implementations§
source§impl Clone for MasterBaseTable
impl Clone for MasterBaseTable
source§fn clone(&self) -> MasterBaseTable
fn clone(&self) -> MasterBaseTable
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MasterBaseTable
impl Debug for MasterBaseTable
source§impl MasterTable<BFieldElement> for MasterBaseTable
impl MasterTable<BFieldElement> for MasterBaseTable
fn trace_domain(&self) -> ArithmeticDomain
fn randomized_trace_domain(&self) -> ArithmeticDomain
fn quotient_domain(&self) -> ArithmeticDomain
fn fri_domain(&self) -> ArithmeticDomain
source§fn trace_table(&self) -> ArrayView2<'_, BFieldElement>
fn trace_table(&self) -> ArrayView2<'_, BFieldElement>
Presents underlying trace data, excluding trace randomizers and randomizer polynomials.
source§fn trace_table_mut(&mut self) -> ArrayViewMut2<'_, BFieldElement>
fn trace_table_mut(&mut self) -> ArrayViewMut2<'_, BFieldElement>
Mutably presents underlying trace data, excluding trace randomizers and randomizer
polynomials.
fn randomized_trace_table(&self) -> ArrayView2<'_, BFieldElement>
fn randomized_trace_table_mut(&mut self) -> ArrayViewMut2<'_, BFieldElement>
source§fn quotient_domain_table(&self) -> ArrayView2<'_, BFieldElement>
fn quotient_domain_table(&self) -> ArrayView2<'_, BFieldElement>
The low-degree extended randomized trace data over the quotient domain. Includes randomizer
polynomials. Requires having called
low_degree_extend_all_columns first.source§fn fri_domain_table(&self) -> ArrayView2<'_, BFieldElement>
fn fri_domain_table(&self) -> ArrayView2<'_, BFieldElement>
The low-degree extended randomized trace data over the FRI domain. Includes randomizer
polynomials. Requires having called
low_degree_extend_all_columns first.source§fn memoize_low_degree_extended_table(
&mut self,
low_degree_extended_columns: Array2<BFieldElement>
)
fn memoize_low_degree_extended_table( &mut self, low_degree_extended_columns: Array2<BFieldElement> )
Not intended for direct use, but through
Self::low_degree_extend_all_columns.source§fn low_degree_extended_table(&self) -> ArrayView2<'_, BFieldElement>
fn low_degree_extended_table(&self) -> ArrayView2<'_, BFieldElement>
Requires having called
low_degree_extend_all_columns first.source§fn memoize_interpolation_polynomials(
&mut self,
interpolation_polynomials: Array1<Polynomial<BFieldElement>>
)
fn memoize_interpolation_polynomials( &mut self, interpolation_polynomials: Array1<Polynomial<BFieldElement>> )
Memoize the polynomials interpolating the columns.
Not intended for direct use, but through
Self::low_degree_extend_all_columns.source§fn interpolation_polynomials(&self) -> ArrayView1<'_, Polynomial<XFieldElement>>
fn interpolation_polynomials(&self) -> ArrayView1<'_, Polynomial<XFieldElement>>
Requires having called
low_degree_extend_all_columns first. source§fn row(&self, row_index: XFieldElement) -> Array1<XFieldElement>
fn row(&self, row_index: XFieldElement) -> Array1<XFieldElement>
Get one row of the table at an arbitrary index. Notably, the index does not have to be in
any of the domains. In other words, can be used to compute out-of-domain rows. Requires
having called
low_degree_extend_all_columns first.
Does not include randomizer polynomials.fn hash_one_row(row: ArrayView1<'_, BFieldElement>) -> Digest
source§fn randomize_trace(&mut self)
fn randomize_trace(&mut self)
Set all rows not part of the actual (padded) trace to random values.
source§fn low_degree_extend_all_columns(&mut self)
fn low_degree_extend_all_columns(&mut self)
Low-degree extend all columns of the randomized trace domain table. The resulting
low-degree extended columns can be accessed using
quotient_domain_table and
fri_domain_table.source§fn merkle_tree(
&self,
maybe_profiler: &mut Option<TritonProfiler>
) -> MerkleTree<Tip5>
fn merkle_tree( &self, maybe_profiler: &mut Option<TritonProfiler> ) -> MerkleTree<Tip5>
Compute a Merkle tree of the FRI domain table. Every row gives one leaf in the tree.
The function
hash_row is used to hash each row.fn hash_all_fri_domain_rows(&self) -> Vec<Digest>
Auto Trait Implementations§
impl Freeze for MasterBaseTable
impl RefUnwindSafe for MasterBaseTable
impl Send for MasterBaseTable
impl Sync for MasterBaseTable
impl Unpin for MasterBaseTable
impl UnwindSafe for MasterBaseTable
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> 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