pub struct CompositionPoly<E: FieldElement> { /* private fields */ }
Expand description

Represents a composition polynomial split into columns with each column being of length equal to trace_length.

For example, if the composition polynomial has degree 2N - 1, where N is the trace length, it will be stored as two columns of size N (each of degree N - 1).

Implementations§

source§

impl<E: FieldElement> CompositionPoly<E>

source

pub fn new( composition_trace: CompositionPolyTrace<E>, domain: &StarkDomain<E::BaseField>, num_cols: usize ) -> Self

Returns a new composition polynomial.

source

pub fn num_columns(&self) -> usize

Returns the number of individual column polynomials used to describe this composition polynomial.

source

pub fn column_len(&self) -> usize

Returns the length of individual column polynomials; this is guaranteed to be a power of 2.

source

pub fn column_degree(&self) -> usize

Returns the degree of individual column polynomial.

source

pub fn evaluate_at(&self, z: E) -> Vec<E>

Returns evaluations of all composition polynomial columns at point z.

source

pub fn data(&self) -> &ColMatrix<E>

Returns a reference to the matrix of individual column polynomials.

source

pub fn into_columns(self) -> Vec<Vec<E>>

Transforms this composition polynomial into a vector of individual column polynomials.

Auto Trait Implementations§

§

impl<E> RefUnwindSafe for CompositionPoly<E>
where E: RefUnwindSafe,

§

impl<E> Send for CompositionPoly<E>

§

impl<E> Sync for CompositionPoly<E>

§

impl<E> Unpin for CompositionPoly<E>
where E: Unpin,

§

impl<E> UnwindSafe for CompositionPoly<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> 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

§

type Output = T

Should always be Self
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.