Struct winter_prover::CompositionPoly
source · 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>
impl<E: FieldElement> CompositionPoly<E>
sourcepub fn new(
composition_trace: CompositionPolyTrace<E>,
domain: &StarkDomain<E::BaseField>,
num_cols: usize
) -> Self
pub fn new( composition_trace: CompositionPolyTrace<E>, domain: &StarkDomain<E::BaseField>, num_cols: usize ) -> Self
Returns a new composition polynomial.
sourcepub fn num_columns(&self) -> usize
pub fn num_columns(&self) -> usize
Returns the number of individual column polynomials used to describe this composition polynomial.
sourcepub fn column_len(&self) -> usize
pub fn column_len(&self) -> usize
Returns the length of individual column polynomials; this is guaranteed to be a power of 2.
sourcepub fn column_degree(&self) -> usize
pub fn column_degree(&self) -> usize
Returns the degree of individual column polynomial.
sourcepub fn evaluate_at(&self, z: E) -> Vec<E>
pub fn evaluate_at(&self, z: E) -> Vec<E>
Returns evaluations of all composition polynomial columns at point z.
sourcepub fn data(&self) -> &ColMatrix<E>
pub fn data(&self) -> &ColMatrix<E>
Returns a reference to the matrix of individual column polynomials.
sourcepub fn into_columns(self) -> Vec<Vec<E>>
pub fn into_columns(self) -> Vec<Vec<E>>
Transforms this composition polynomial into a vector of individual column polynomials.