MCPcopy Create free account
hub / github.com/EbTech/rust-algorithms / convolution

Function convolution

src/math/fft.rs:168–174  ·  view source on GitHub ↗

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.

(a: &[T], b: &[T])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

test_complex_convolutionFunction · 0.85
test_modular_convolutionFunction · 0.85

Calls 2

dft_from_realsFunction · 0.85
idft_to_realsFunction · 0.85

Tested by 2

test_complex_convolutionFunction · 0.68
test_modular_convolutionFunction · 0.68