pub struct Table<E>where
E: FieldElement,{ /* private fields */ }Expand description
A two-dimensional table of field elements arranged in row-major order.
This struct is used primarily to hold queried values of execution trace segments and constraint evaluations. In such cases, each row in the table corresponds to a single query, and each column corresponds to a trace segment column or a constraint evaluation column.
Implementations§
Source§impl<E> Table<E>where
E: FieldElement,
impl<E> Table<E>where
E: FieldElement,
Sourcepub fn from_bytes(
bytes: &[u8],
num_rows: usize,
num_cols: usize,
) -> Result<Table<E>, DeserializationError>
pub fn from_bytes( bytes: &[u8], num_rows: usize, num_cols: usize, ) -> Result<Table<E>, DeserializationError>
Sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Returns number of columns in this table.
Sourcepub fn get_row(&self, row_idx: usize) -> &[E]
pub fn get_row(&self, row_idx: usize) -> &[E]
Returns a reference to a row at the specified index.
Sourcepub fn merge(tables: Vec<Table<E>>) -> Table<E>
pub fn merge(tables: Vec<Table<E>>) -> Table<E>
Combines multiple tables together into a single table by stacking tables column-wise (e.g. the number of rows remains the same but the number of columns changes).
Currently, this method does not support inputs containing more than one table.
§Panics
Panics if the list of tables is empty.
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for Table<E>
impl<E> RefUnwindSafe for Table<E>where
E: RefUnwindSafe,
impl<E> Send for Table<E>
impl<E> Sync for Table<E>
impl<E> Unpin for Table<E>where
E: Unpin,
impl<E> UnwindSafe for Table<E>where
E: 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