Here then are the four functions included in FFTEASY. I describe below what all the arguments are.
All of these functions take an array of the data to be
transformed and an integer
specifying whether to take a
forward transform (
) or an inverse transform
(
). The one-dimensional routines take an integer
giving the number of data points in the array. For fftr1
is the
number of real data points while for fftc1
is the number of
complex data points, meaning that for fftc1
should be an array of
floats of size
. The n dimensional routines take an integer
giving the number of dimensions and an array of integers
giving the number of data points (real or complex) in each
dimension. For the complex routines the data should alternate between
real and imaginary parts, i.e.
. Note that the last dimension of the array
should always be
twice as large as the actual number of data points to account for the
fact that it takes two floats to represent a complex number. (See the
examples in section 4). Finally the function fftrn takes
an additional array
for holding the Nyquist frequency
components of the transform. I explain this below when I describe the
storage scheme for the results of transforms of real data.
Note that even fftcn and fftrn take as input one dimensional arrays. Actually the functions assume that the data are arranged as in an n-dimensional array, so all you have to do is take your multidimensional array and cast it as a (float *) when you pass it to FFTEASY.