Luftzig / elm-signal-processing / Convolution

Functions for convolution See: https://en.wikipedia.org/wiki/Convolution

Functions:

convolve : List Basics.Float -> List Basics.Float -> List Basics.Float

Convolve two real number lists, using FFT for lists longer than 128 elements or direct convolution otherwise. Threshold was determined by benchmarks.

convolve [ 1, 0, 0, 0 ] [ 0, 0, 1, 1 ] --> [0, 0, 1, 1]

convolveDirectly : List Basics.Float -> List Basics.Float -> List Basics.Float

Convolve two lists of numbers directly by $$ zs_j = \sum_i^n {xs_i * ys_{j - i}} $$