LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::fft Namespace Reference

Namespace with all FFT and inverse FFT routines based on code by Takuya Ooura with kind permission ooura@kurims.kyoto-u.ac.jp or ooura@mmm.t.u-tokyo.ac.jp). More...

Functions

template<class T >
T * alloc_1d (const int &n1)
template<class T >
void free_1d (T *i)
template<class T >
T ** alloc_2d (const int &n1, const int &n2)
template<class T >
void free_2d (T **ii)
template<class T >
void vrdft (int n, int isgn, vector< T > &a, int *ip, T *w)
template<class T >
void rdft (int n, int isgn, T *a, int *ip, T *w)
template<class T >
void cdft (int n, int isgn, T *a, int *ip, T *w)

Detailed Description

Namespace with all FFT and inverse FFT routines based on code by Takuya Ooura with kind permission ooura@kurims.kyoto-u.ac.jp or ooura@mmm.t.u-tokyo.ac.jp).

The code has been adapted to use C++ and LTI-lib conventions. This functions will be used by the functors lti::realFFT and lti::realInvFFT


Function Documentation

template<class T >
T* lti::fft::alloc_1d ( const int &  n1  )  [inline]

reserve memory for a n-dimensional vector of elements with type T

Parameters:
n1 dimension of the vector
Returns:
pointer to the elements of the vector
template<class T >
T** lti::fft::alloc_2d ( const int &  n1,
const int &  n2 
) [inline]

reserve memory for a n1xn2-matrix of elementes of type T

Parameters:
n1 number of rows
n2 number of columns
Returns:
pointer to the elements of the vector
template<class T >
void lti::fft::cdft ( int  n,
int  isgn,
T *  a,
int *  ip,
T *  w 
) [inline]

complex direct fourier transform

Parameters:
n data length (must be power of 2)
isgn transform direction: +1 for transform and -1 for inverse.
a the input/output data. In the frecuency domain the real parts will be stored in the even locations and the imaginary parts in the odd locations. a[1] = real[n/2]
ip work area for bit reversal. ip[0] and ip[1] are pointers to cos/sin table
w cos/sin table.

w[] and ip[] will be initialized if ip[0] == 0

template<class T >
void lti::fft::free_1d ( T *  i  )  [inline]

free memory of 1d array of elements with type T

template<class T >
void lti::fft::free_2d ( T **  ii  )  [inline]

free memory of 2d array of elements with type T

template<class T >
void lti::fft::rdft ( int  n,
int  isgn,
T *  a,
int *  ip,
T *  w 
) [inline]

real discrete fourier transform

Parameters:
n data length (must be power of 2)
isgn transform direction: +1 for transform and -1 for inverse.
a the input/output data. In the frecuency domain the real parts will be stored in the even locations and the imaginary parts in the odd locations. a[1] = real[n/2]
ip work area for bit reversal. ip[0] and ip[1] are pointers to cos/sin table
w cos/sin table.

w[] and ip[] will be initialized if ip[0] == 0

template<class T >
void lti::fft::vrdft ( int  n,
int  isgn,
vector< T > &  a,
int *  ip,
T *  w 
) [inline]

real discrete fourier transform for lti::vectors

Parameters:
n data length (must be power of 2)
isgn transform direction: +1 for transform and -1 for inverse.
a the input/output data. In the frecuency domain the real parts will be stored in the even locations and the imaginary parts in the odd locations. a[1] = real[n/2]
ip work area for bit reversal. ip[0] and ip[1] are pointers to cos/sin table
w cos/sin table. 3 w[] and ip[] will be initialized if ip[0] == 0

Generated on Sat Apr 10 15:29:18 2010 for LTI-Lib by Doxygen 1.6.1