pub struct PeriodicColumns<'a, F> { /* private fields */ }Expand description
Periodic columns screened against the rows they have to cover.
A column of length p holds the evaluations of one polynomial over a subgroup of order p.
- Such a subgroup exists only when
pis a power of two. - It tiles the rows only when
pdivides the height.
height 8, length 2 [0,1][0,1][0,1][0,1] tiles
height 8, length 16 [0,1,...,7|8,...,15] truncated
height 12, length 8 [0,...,7][0,1,2,3|4,...] partial repeatRow lookups wrap with row mod p, so an ill-shaped column still yields a value on every row.
Reading rows alone never reveals the mistake.
Evaluation is where it breaks. Every path divides the height by the length and takes a base-two logarithm of the quotient. Neither step means anything for a shape the rule rejects.
Holding this view is the evidence that the rule was applied.
Implementations§
Source§impl<'a, F> PeriodicColumns<'a, F>
impl<'a, F> PeriodicColumns<'a, F>
Sourcepub fn new(
columns: &'a [Vec<F>],
height: usize,
) -> Result<Self, PeriodicColumnShapeError>
pub fn new( columns: &'a [Vec<F>], height: usize, ) -> Result<Self, PeriodicColumnShapeError>
Screen the declared columns against the rows they have to cover.
§Errors
- A length that is not a power of two, zero included.
- A length that does not divide the height.
Sourcepub fn max_period(&self) -> Option<usize>
pub fn max_period(&self) -> Option<usize>
Longest declared period, absent when the declaration is empty.
Every period divides the height, so the longest one divides it too. Padding every column up to it yields one rectangular table over a single subgroup.
Trait Implementations§
Source§impl<F> Clone for PeriodicColumns<'_, F>
impl<F> Clone for PeriodicColumns<'_, F>
impl<F> Copy for PeriodicColumns<'_, F>
Auto Trait Implementations§
impl<'a, F> Freeze for PeriodicColumns<'a, F>
impl<'a, F> RefUnwindSafe for PeriodicColumns<'a, F>where
&'a [Vec<F>]: RefUnwindSafe,
impl<'a, F> Send for PeriodicColumns<'a, F>
impl<'a, F> Sync for PeriodicColumns<'a, F>
impl<'a, F> Unpin for PeriodicColumns<'a, F>
impl<'a, F> UnsafeUnpin for PeriodicColumns<'a, F>where
&'a [Vec<F>]: UnsafeUnpin,
impl<'a, F> UnwindSafe for PeriodicColumns<'a, F>where
&'a [Vec<F>]: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more