Function winter_math::fft::get_inv_twiddles
source · pub fn get_inv_twiddles<B>(domain_size: usize) -> Vec<B>where
B: StarkField,
Expand description
Returns a set of inverse twiddles for the specified domain size.
These twiddles can then be used for FFT-based polynomial interpolation. The length of the
returned vector will be equal to domain_size
/ 2.
When concurrent
feature is enabled, the twiddles are generated in multiple threads.
Panics
Panics if:
domain_size
is not a power of two.- Field specified by
B
does not contain a multiplicative subgroup of sizedomain_size
.
Examples
let n = 2048;
let inv_twiddles = get_inv_twiddles::<BaseElement>(n);
assert_eq!(n / 2, inv_twiddles.len());