NDEVR
API Documentation
FFTLogic< t_type >

Provides Fast Fourier Transform logic for converting signals between the time and frequency domains. More...

Static Public Member Functions

static void FT (Buffer< std::complex< t_type > > &in_out)
 Computes the forward Fourier Transform on a buffer of complex values in place.
static void IFT (Buffer< std::complex< t_type > > &in_out)
 Computes the inverse Fourier Transform on a buffer of complex values in place.

Static Protected Member Functions

static void dft (const std::complex< t_type > f[], std::complex< t_type > ftilde[], uint04 N, uint04 step)
 Computes the basic Discrete Fourier Transform for arbitrary-length input.
static void fft (Buffer< std::complex< t_type > > &in_out, Buffer< std::complex< t_type > > &temp, uint04 offset, uint04 size)
 Computes the in-place Fast Fourier Transform using the Cooley-Tukey algorithm.
static void iFFT (const std::complex< t_type > ftilde[], std::complex< t_type > f[], uint04 N)
 Computes the inverse FFT from a frequency-domain array into a time-domain array.
static void ifft (Buffer< std::complex< t_type > > &in_out, Buffer< std::complex< t_type > > &temp, uint04 offset, uint04 size)
 Computes the inverse FFT by conjugating, applying the forward FFT, then conjugating and scaling the result.

Detailed Description

template<class t_type>
class FFTLogic< t_type >

Provides Fast Fourier Transform logic for converting signals between the time and frequency domains.


Definition at line 15 of file FFT.h.

Member Function Documentation

◆ dft()

template<class t_type>
void FFTLogic< t_type >::dft ( const std::complex< t_type > f[],
std::complex< t_type > ftilde[],
uint04 N,
uint04 step )
inlinestaticprotected

Computes the basic Discrete Fourier Transform for arbitrary-length input.

Parameters
[in]fThe input array of complex frequency-domain or time-domain samples.
[in]ftildeThe output array to receive the transformed complex values.
[in]NThe number of elements to transform.
[in]stepThe stride between consecutive elements in the input array.

Definition at line 70 of file FFT.h.

References PI().

Referenced by fft().

◆ fft()

template<class t_type>
void FFTLogic< t_type >::fft ( Buffer< std::complex< t_type > > & in_out,
Buffer< std::complex< t_type > > & temp,
uint04 offset,
uint04 size )
inlinestaticprotected

Computes the in-place Fast Fourier Transform using the Cooley-Tukey algorithm.

Falls back to DFT for non-power-of-two sizes.

Parameters
[in]in_outThe buffer of complex values to transform in place.
[in]tempA temporary working buffer of the same size used during computation.
[in]offsetThe starting index within the buffers for this sub-transform.
[in]sizeThe number of elements to transform starting from offset.

Definition at line 26 of file FFT.h.

References cast(), dft(), fft(), and PI().

Referenced by fft(), FT(), iFFT(), and ifft().

◆ FT()

template<class t_type>
void FFTLogic< t_type >::FT ( Buffer< std::complex< t_type > > & in_out)
inlinestatic

Computes the forward Fourier Transform on a buffer of complex values in place.

Parameters
[in]in_outThe buffer of complex values to transform. Results are written back in place.

Definition at line 141 of file FFT.h.

References fft().

◆ iFFT()

template<class t_type>
void FFTLogic< t_type >::iFFT ( const std::complex< t_type > ftilde[],
std::complex< t_type > f[],
uint04 N )
inlinestaticprotected

Computes the inverse FFT from a frequency-domain array into a time-domain array.

Parameters
[in]ftildeThe input array of frequency-domain complex values.
[in]fThe output array to receive the inverse-transformed time-domain values.
[in]NThe number of elements to transform.

Definition at line 121 of file FFT.h.

References fft().

◆ ifft()

template<class t_type>
void FFTLogic< t_type >::ifft ( Buffer< std::complex< t_type > > & in_out,
Buffer< std::complex< t_type > > & temp,
uint04 offset,
uint04 size )
inlinestaticprotected

Computes the inverse FFT by conjugating, applying the forward FFT, then conjugating and scaling the result.

Parameters
[in]in_outThe buffer of complex values to inverse-transform in place.
[in]tempA temporary working buffer of the same size used during computation.
[in]offsetThe starting index within the buffers for this sub-transform.
[in]sizeThe number of elements to transform starting from offset.

Definition at line 95 of file FFT.h.

References fft().

Referenced by IFT().

◆ IFT()

template<class t_type>
void FFTLogic< t_type >::IFT ( Buffer< std::complex< t_type > > & in_out)
inlinestatic

Computes the inverse Fourier Transform on a buffer of complex values in place.

Parameters
[in]in_outThe buffer of complex values to inverse-transform. Results are written back in place.

Definition at line 151 of file FFT.h.

References ifft().


The documentation for this class was generated from the following file: