The fast-Fourier (inverse) transform. A complex-valued matrix of the same size as x.
Arguments
x
A numeric matrix to be transformed.
inverse
Whether it should compute the inverse transform (defaults to FALSE).
fftw
Whether the fftwtools R package is available.
Author
J.C. Marshall
Details
This function is called wherever sparr seeks to perform a 2D fast-Fourier
transform. Where available, computational expense is noticeably reduced by appealing to routines
in the independent `FFTW' toolbox. The user is encouraged to install the corresponding R package fftwtools from CRAN;
this function will automatically detect and use the faster option, otherwise will
defer to the built-in fft.