pub struct OodFrame { /* private fields */ }
Expand description

Trace and constraint polynomial evaluations at an out-of-domain point.

This struct contains the following evaluations:

  • Evaluations of all trace polynomials at z.
  • Evaluations of all trace polynomials at z * g.
  • Evaluations of constraint composition column polynomials at z.

where z is an out-of-domain point and g is the generator of the trace domain.

Internally, the evaluations are stored as a sequence of bytes. Thus, to retrieve the evaluations, parse() function should be used.

Implementations§

source§

impl OodFrame

source

pub fn set_trace_states<E>(&mut self, trace_states: &[Vec<E>]) -> Vec<E>
where E: FieldElement,

Updates the trace state portion of this out-of-domain frame. This also returns a compacted version of the out-of-domain frame with the rows interleaved. This is done so that reseeding of the random coin needs to be done only once as opposed to once per each row.

§Panics

Panics if evaluation frame has already been set.

source

pub fn set_constraint_evaluations<E>(&mut self, evaluations: &[E])
where E: FieldElement,

Updates constraint evaluation portion of this out-of-domain frame.

§Panics

Panics if:

  • Constraint evaluations have already been set.
  • evaluations is an empty vector.
source

pub fn parse<E>( self, main_trace_width: usize, aux_trace_width: usize, num_evaluations: usize ) -> Result<(Vec<E>, Vec<E>), DeserializationError>
where E: FieldElement,

Returns main and auxiliary (if any) trace evaluation frames and a vector of out-of-domain constraint evaluations contained in self.

§Panics

Panics if either main_trace_width or num_evaluations are equal to zero.

§Errors

Returns an error if:

  • Valid [EvaluationFrame]s for the specified main_trace_width and aux_trace_width could not be parsed from the internal bytes.
  • A vector of evaluations specified by num_evaluations could not be parsed from the internal bytes.
  • Any unconsumed bytes remained after the parsing was complete.

Trait Implementations§

source§

impl Clone for OodFrame

source§

fn clone(&self) -> OodFrame

Returns a copy 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 Debug for OodFrame

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for OodFrame

source§

fn default() -> OodFrame

Returns the “default value” for a type. Read more
source§

impl Deserializable for OodFrame

source§

fn read_from<R>(source: &mut R) -> Result<OodFrame, DeserializationError>
where R: ByteReader,

Reads a OOD frame from the specified source and returns the result

§Errors

Returns an error of a valid OOD frame could not be read from the specified source.

source§

fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>

Attempts to deserialize the provided bytes into Self and returns the result. Read more
source§

impl PartialEq for OodFrame

source§

fn eq(&self, other: &OodFrame) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serializable for OodFrame

source§

fn write_into<W>(&self, target: &mut W)
where W: ByteWriter,

Serializes self and writes the resulting bytes into the target.

source§

fn get_size_hint(&self) -> usize

Returns an estimate of how many bytes are needed to represent self.

source§

fn to_bytes(&self) -> Vec<u8>

Serializes self into a vector of bytes.
source§

impl Eq for OodFrame

source§

impl StructuralPartialEq for OodFrame

Auto Trait Implementations§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more