Struct winterfell::EvaluationFrame
[−]pub struct EvaluationFrame<E> where
E: FieldElement, { /* private fields */ }
Expand description
A set of execution trace rows required for evaluation of transition constraints.
In the current implementation, an evaluation frame always contains two consecutive rows of the execution trace. It is passed in as one of the parameters into Air::evaluate_transition() function.
Implementations
impl<E> EvaluationFrame<E> where
E: FieldElement,
impl<E> EvaluationFrame<E> where
E: FieldElement,
pub fn new(num_columns: usize) -> EvaluationFrame<E>
pub fn new(num_columns: usize) -> EvaluationFrame<E>
Returns a new evaluation frame instantiated with the specified number of columns.
Panics
Panics if num_columns
is zero.
pub fn from_rows(
current: Vec<E, Global>,
next: Vec<E, Global>
) -> EvaluationFrame<E>
pub fn from_rows(
current: Vec<E, Global>,
next: Vec<E, Global>
) -> EvaluationFrame<E>
Returns a new evaluation frame instantiated from the provided rows.
Panics
Panics if:
- Lengths of the provided rows are zero.
- Lengths of the provided rows are not the same.
pub fn current(&self) -> &[E]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn current(&self) -> &[E]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns a reference to the current row.
pub fn current_mut(&mut self) -> &mut [E]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn current_mut(&mut self) -> &mut [E]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Returns a mutable reference to the current row.
Trait Implementations
impl<E> Clone for EvaluationFrame<E> where
E: Clone + FieldElement,
impl<E> Clone for EvaluationFrame<E> where
E: Clone + FieldElement,
fn clone(&self) -> EvaluationFrame<E>
fn clone(&self) -> EvaluationFrame<E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<E> RefUnwindSafe for EvaluationFrame<E> where
E: RefUnwindSafe,
impl<E> Send for EvaluationFrame<E>
impl<E> Sync for EvaluationFrame<E>
impl<E> Unpin for EvaluationFrame<E> where
E: Unpin,
impl<E> UnwindSafe for EvaluationFrame<E> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more