AuLib  1.0beta
Functions | Variables
AuLib::fft Namespace Reference

Functions

void transform (std::vector< std::complex< double >> &data, bool dir)
 
void transform (std::vector< std::complex< double >> &out, double *in, bool pckd=true)
 
void transform (double *out, std::vector< std::complex< double >> &in, bool pckd=true)
 

Variables

const bool forward = true
 
const bool inverse = false
 
const bool polar = true
 
const bool rectang = false
 
const bool packed = true
 

Function Documentation

◆ transform() [1/3]

void AuLib::fft::transform ( std::vector< std::complex< double >> &  data,
bool  dir 
)

In-place complex-to-complex FFT
data - data to be transformed
dir - true for forward operation, false for inverse
pckd - true for packed data (first point is DC,Nyq) Size of data is expected to be a power-of-two.

◆ transform() [2/3]

void AuLib::fft::transform ( std::vector< std::complex< double >> &  out,
double *  in,
bool  pckd = true 
)

Real-to-complex forward FFT (size N)
in - pointer to real array of size N or N + 1
out - complex vector of size N/2 or N/2 + 1
pckd - true for packed data. Size of complex out array is expected to be a power-of-two (pckd = fft::packed) or power-of-two + 1 (pckd = !fftpacked) In packed form im(0) contains the Nyquist coefficient
The in and out data may reside in the same memory location for an in-place transform (but should have enough memory to hold N/2 or N/2

  • 1 complex numbers).

◆ transform() [3/3]

void AuLib::fft::transform ( double *  out,
std::vector< std::complex< double >> &  in,
bool  pckd = true 
)

Complex-to-real inverse FFT (size N)
in - complex vector of size N/2 or N/2 + 1
with im(0) containing the Nyquist coefficient
out - real array of size N or N + 1
Size of complex in array is expected to be a power-of-two (pckd = fft::packed) or power-of-two + 1 (pckd = !fftpacked) In packed form im(0) contains the Nyquist coefficient
The in and out data may reside in the same memory location for an in-place transform (but should have enough memory to hold N/2 or N/2

  • 1 complex numbers).

Variable Documentation

◆ forward

const bool AuLib::fft::forward = true

definition of forward

◆ inverse

const bool AuLib::fft::inverse = false

definition of inverse

◆ packed

const bool AuLib::fft::packed = true

definition of packed

◆ polar

const bool AuLib::fft::polar = true

definition of polar

◆ rectang

const bool AuLib::fft::rectang = false

definition of rectang