EvaluationFrame

Struct EvaluationFrame 

Source
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§

Source§

impl<E> EvaluationFrame<E>
where E: FieldElement,

Source

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.

Source

pub fn from_rows(current: Vec<E>, next: Vec<E>) -> 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.
Source

pub fn current(&self) -> &[E]

Returns a reference to the current row.

Source

pub fn next(&self) -> &[E]

Returns a reference to the next row.

Source

pub fn current_mut(&mut self) -> &mut [E]

Returns a mutable reference to the current row.

Source

pub fn next_mut(&mut self) -> &mut [E]

Returns a mutable reference to the next row.

Trait Implementations§

Source§

impl<E> Clone for EvaluationFrame<E>
where E: Clone + FieldElement,

Source§

fn clone(&self) -> EvaluationFrame<E>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E> Debug for EvaluationFrame<E>
where E: Debug + FieldElement,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E> Freeze for EvaluationFrame<E>

§

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§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.