pub struct NormalizedSubspacePolys<F> { /* private fields */ }Expand description
Constants for evaluating the normalized subspace polynomials at an arbitrary field point.
Built from a DomainContext, so these match the basis its NTT transforms over.
Holds only what the recurrence needs.
The evaluations on the basis elements stay in the DomainContext.
Keeping them there is what stops them drifting out of step with the NTT’s own twiddles.
Implementations§
Source§impl<F: BinaryField> NormalizedSubspacePolys<F>
impl<F: BinaryField> NormalizedSubspacePolys<F>
Sourcepub fn new<DC: DomainContext<Field = F>>(domain_context: &DC) -> Self
pub fn new<DC: DomainContext<Field = F>>(domain_context: &DC) -> Self
Builds the constants for domain_context’s basis.
§Panics
Panics if domain_context.log_domain_size() is zero.
Panics if the basis is linearly dependent, which makes a normalizer vanish.
Sourcepub const fn log_domain_size(&self) -> usize
pub const fn log_domain_size(&self) -> usize
The number of polynomials, matching the domain context’s log_domain_size.
Sourcepub fn evals_at(&self, x: F) -> Vec<F>
pub fn evals_at(&self, x: F) -> Vec<F>
Evaluates every $\hat{W}_k$ at an arbitrary field point, in increasing $k$.
Runs the normalized recurrence
W_hat_0(x) = x * beta_0^-1
W_hat_{i+1}(x) = W_hat_i(x) * (W_hat_i(x) + 1) * step_inv[i]It follows from $W_{i+1}(X) = W_i(X) (W_i(X) + W_i(\beta_i))$, divided by the normalizers.
Costs $\ell$ multiplications and no inversions.
Trait Implementations§
Source§impl<F: Clone> Clone for NormalizedSubspacePolys<F>
impl<F: Clone> Clone for NormalizedSubspacePolys<F>
Source§fn clone(&self) -> NormalizedSubspacePolys<F>
fn clone(&self) -> NormalizedSubspacePolys<F>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<F> Freeze for NormalizedSubspacePolys<F>where
F: Freeze,
impl<F> RefUnwindSafe for NormalizedSubspacePolys<F>where
F: RefUnwindSafe,
impl<F> Send for NormalizedSubspacePolys<F>where
F: Send,
impl<F> Sync for NormalizedSubspacePolys<F>where
F: Sync,
impl<F> Unpin for NormalizedSubspacePolys<F>where
F: Unpin,
impl<F> UnsafeUnpin for NormalizedSubspacePolys<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for NormalizedSubspacePolys<F>where
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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