Expand description
The Fast Fourier Transform (FFT) and Number Theoretic Transform (NTT)
Traits§
Functions§
- convolution
- Given two polynomials (vectors) sum_i a[i] x^i and sum_i b[i] x^i, computes their product (convolution) c[k] = sum_(i+j=k) a[i]*b[j]. Uses complex FFT if inputs are f64, or modular NTT if inputs are i64.
- dft_
from_ reals - From a slice of reals (f64 or i64), computes DFT of size at least desired_len
- fft
- Computes the discrete fourier transform of v, whose length is a power of 2. Forward transform: polynomial coefficients -> evaluate at roots of unity Inverse transform: values at roots of unity -> interpolated coefficients
- idft_
to_ reals - The inverse of dft_from_reals()