pub fn apply_circulant<R: PrimeCharacteristicRing, const N: usize>(
circ_matrix: &[u64; N],
input: &[R; N],
) -> [R; N]Expand description
Given the first row circ_matrix of an NxN circulant matrix, say
C, return the product C*input.
NB: This is a naive O(N^2) implementation. It serves as a fallback for cases where faster paths (Karatsuba convolution or FFT) do not apply — e.g. non-power-of-two widths, non-two-adic fields, or packed types without a specialised implementation.