module Fourier: sig
.. end
Fourier Transform
val pi : float
Constant

.
val dft_aux : float -> Complex.t list -> Complex.t list
An auxiliary routine for dft
and idft
.
val dft : Complex.t list -> Complex.t list
A naive implementation of Discrete Fourier Transform (DFT).
DFT is defined as
![\[y_k = \sum^{N-1}_{t = 0} x_t \exp\left( -i \frac{2 \pi tk}{N} \right)
\quad (k = 0, \dots, N-1)\]](ltx/6631c0981862084955b6f8fabf0a27d2.gif)
where

are time-domain data points,

are frequency-domain data points.
val idft : Complex.t list -> Complex.t list
A naive implementation of Inverse Discrete Fourier Transform (IDFT),
the inverse transformation of DFT:
![\[x_t = \sum^{N-1}_{k = 0} y_k \exp\left( i \frac{2 \pi tk}{N} \right)
\quad (t = 0, \dots, N-1)\]](ltx/34f0e6cc7f43e2c5b466c9acb71a7905.gif)
val fft_aux : float -> Complex.t list -> Complex.t list
An auxiliary routine for fft
and ifft
.
val fft : Complex.t list -> Complex.t list
An implementation of Cooley-Tukey Fast Fourier Transform (FFT) algorithm.
dft
takes

time, but
fft
takes

time!
val ifft : Complex.t list -> Complex.t list
An implementation of Inverse Fast Fourier Transform (IFFT).
idft
takes

time, but
ifft
takes

time!