fftw
Some functions in the fftw
fast Fourier transform library are
callable by virtual code programs of the form
library('fftw',f)
, where f
can be one of the following
character strings.
u_fw_dft
u_bw_dft
b_fw_dft
b_bw_dft
u_dht
b_dht
These stand for the discrete Fourier transform, in one dimension and two
dimensions, either backward or forward, and the discrete Hartley
transform in one dimension and two dimensions. The fftw
library
documentation (http://www.fftw.org) can give more information
about the meaning of these transformations.
The interface is somewhat simplified compared to the API for the fftw
C library because there are no considerations of memory management or
planning, nor any provision for dimensions higher than two.
Furthermore, from the virtual side of the interface, these functions operate on lists rather than arrays. The one dimensional Fourier transforms take a list of complex numbers to a list of complex numbers (see complex), and the one dimensional Hartley transforms take a list of reals to a list of reals (see math). The two dimensional transforms are analogous but they take a matrix represented as a list of lists. Error messages pertaining to invalid input documented at the beginning of this section (External Libraries) are relevant.
Finally, unlike the native API for fftw
, these transformations are
scaled so that the backward transformation is the inverse of the
forward, and the Hartley transformations are their own inverses
(subject to roundoff error).