pub trait AdditiveNTT<P: PackedField> {
// Required methods
fn log_domain_size(&self) -> usize;
fn get_subspace_eval(&self, i: usize, j: usize) -> P::Scalar;
fn forward_transform(
&self,
data: &mut [P],
coset: u32,
log_batch_size: usize,
) -> Result<(), Error>;
fn inverse_transform(
&self,
data: &mut [P],
coset: u32,
log_batch_size: usize,
) -> Result<(), Error>;
// Provided methods
fn forward_transform_ext<PE>(
&self,
data: &mut [PE],
coset: u32,
) -> Result<(), Error>
where PE: RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar> { ... }
fn inverse_transform_ext<PE>(
&self,
data: &mut [PE],
coset: u32,
) -> Result<(), Error>
where PE: RepackedExtension<P>,
PE::Scalar: ExtensionField<P::Scalar> { ... }
}
Expand description
The additive NTT defined defined in LCH14.
Required Methods§
sourcefn log_domain_size(&self) -> usize
fn log_domain_size(&self) -> usize
Base-2 logarithm of the size of the NTT domain.
sourcefn get_subspace_eval(&self, i: usize, j: usize) -> P::Scalar
fn get_subspace_eval(&self, i: usize, j: usize) -> P::Scalar
Get the normalized subspace polynomial evaluation $\hat{W}_i(\beta_j)$.
§Preconditions
i
must be less thanself.log_domain_size()
j
must be less thanself.log_domain_size() - i
sourcefn forward_transform(
&self,
data: &mut [P],
coset: u32,
log_batch_size: usize,
) -> Result<(), Error>
fn forward_transform( &self, data: &mut [P], coset: u32, log_batch_size: usize, ) -> Result<(), Error>
Forward transformation defined in LCH14 on a batch of inputs.
Input is the vector of polynomial coefficients in novel basis, output is in Lagrange basis. The batched inputs are interleaved, which improves the cache-efficiency of the computation.
sourcefn inverse_transform(
&self,
data: &mut [P],
coset: u32,
log_batch_size: usize,
) -> Result<(), Error>
fn inverse_transform( &self, data: &mut [P], coset: u32, log_batch_size: usize, ) -> Result<(), Error>
Inverse transformation defined in LCH14 on a batch of inputs.
Input is the vector of polynomial coefficients in Lagrange basis, output is in novel basis. The batched inputs are interleaved, which improves the cache-efficiency of the computation.
Provided Methods§
fn forward_transform_ext<PE>( &self, data: &mut [PE], coset: u32, ) -> Result<(), Error>
fn inverse_transform_ext<PE>( &self, data: &mut [PE], coset: u32, ) -> Result<(), Error>
Object Safety§
This trait is not object safe.