LTL
2.0.x
|
Public Member Functions | |
FourierTransform () | |
constructor More... | |
virtual | ~FourierTransform () |
destructor More... | |
void | FFT_Real2Complex (MArray< T, N > &A, MArray< complex< T >, N > &FFT_A) |
Real to complex (forward) fourier transform. Plan and execute the transform. Output array is not normalized. More... | |
void | FFT_Complex2Real (MArray< complex< T >, N > &FFT_A, MArray< T, N > &A) |
Complex to real (inverse) fourier transform. Plan and execute the transform. Output array is not normalized. More... | |
void | reset () |
dispose plan and call fftw_cleanup() . More... | |
void | FFT (MArray< complex< T >, N > &A, MArray< complex< T >, N > &FFT_A) |
Forward and inverse fourier transform. Plan and execute the transform. Output array is not normalized. More... | |
void | iFFT (MArray< complex< T >, N > &FFT_A, MArray< complex< T >, N > &A) |
void | normalize (MArray< complex< T >, N > &A) |
normalize the array by dividing by the number of elements. More... | |
void | normalize (MArray< T, N > &A) |
MArray< T, N > | shiftDC (MArray< T, N > &A) |
shift DC component to center of MArray . More... | |
MArray< complex< T >, N > | shiftDC (MArray< complex< T >, N > &A) |
Protected Member Functions | |
void | execute () |
Protected Attributes | |
unsigned | mode |
fftw_plan | plan |
FourierTransform class
Interface to fftw3 FFT library. Currently, each call to one of the FFT methods causes a new plan to be generated. This is highly inefficient, but safe. It guarantees that pointers to the data strorage of MArray
do not escape by being stored in a plan that might survive the MArray
object.
All transforms leave the output array un-normalized. To normalize (divide by number of elements) call normalize()
.
ltl::FourierTransform< T, N >::FourierTransform | ( | ) |
constructor
|
virtual |
destructor
void ltl::FourierTransform< T, N >::FFT | ( | MArray< complex< T >, N > & | A, |
MArray< complex< T >, N > & | FFT_A | ||
) |
Forward and inverse fourier transform. Plan and execute the transform. Output array is not normalized.
void ltl::FourierTransform< T, N >::iFFT | ( | MArray< complex< T >, N > & | FFT_A, |
MArray< complex< T >, N > & | A | ||
) |
void ltl::FourierTransform< T, N >::FFT_Real2Complex | ( | MArray< T, N > & | A, |
MArray< complex< T >, N > & | FFT_A | ||
) |
Real to complex (forward) fourier transform. Plan and execute the transform. Output array is not normalized.
void ltl::FourierTransform< T, N >::FFT_Complex2Real | ( | MArray< complex< T >, N > & | FFT_A, |
MArray< T, N > & | A | ||
) |
Complex to real (inverse) fourier transform. Plan and execute the transform. Output array is not normalized.
void ltl::FourierTransform< T, N >::normalize | ( | MArray< complex< T >, N > & | A | ) |
normalize the array by dividing by the number of elements.
void ltl::FourierTransform< T, N >::normalize | ( | MArray< T, N > & | A | ) |
MArray<T,N> ltl::FourierTransform< T, N >::shiftDC | ( | MArray< T, N > & | A | ) |
shift DC component to center of MArray
.
MArray<complex<T>,N> ltl::FourierTransform< T, N >::shiftDC | ( | MArray< complex< T >, N > & | A | ) |
|
inline |
dispose plan and call fftw_cleanup()
.
References ltl::FourierTransform< T, N >::mode.
|
protected |
|
protected |
Referenced by ltl::FourierTransform< T, N >::reset().
|
protected |