ComplexFFT

class ComplexFFT : public tsa::BaseFFT

Multichannel complex FFT.

This is the implementation of the FFT of a complex multichannel buffer. The transformation is simply iterated over all the channels.

Setters

void SetSign(enum TransformSign s)

set the sign of the transform

Parameters:

s – the new sign of the transform

Operations

void execute(Cmatrix &in, Cmatrix &out)

Execution of the fft of a multichannel buffer of complex double precision numbers. Input data are organized in a matrix. Each row is a different channel, and the number of data to transform is equal to the number of columns. Both the number of rows and the number of columns can change between each call to this method. If the number of rows changes nothing special will happen, if the number of cols changes the plan is reevaluated with the current flags.

Throws:

bad_matrix_size – the dimension of the output array is wrong

Parameters:
  • in – reference to the input multichannel buffer

  • out – reference to the output multichannel buffer

Pre:

The number of rows of input and output matrix must be the same.

Pre:

The number of columns of the output matrix must be equal to the number of columns of the input matrix.

Post:

the input buffer is unchanged, unless SetPreserveInput was called with a false argument

Post:

the output buffer contain the fft of the input data

virtual void MakePlan()

Make a new plan, with the current parameters.

Public Types

enum TransformSign

Transform sign. See the fftw documentation.

Values:

enumerator FORWARD
enumerator BACKWARD

Public Functions

ComplexFFT(int size = 0, enum TransformSign s = FORWARD, enum FFTPlanningMode mode = ESTIMATE, bool PreserveInput = true)

Constructor

Parameters:
  • size – the size of the transform

  • s – the sign of the transform

  • mode – specify the way in which plans are calculated

  • PreserveInput – true if the input buffer must be preserved during the transform, false otherwise

ComplexFFT(const ComplexFFT &from)

Copy constructor

Parameters:

from – The instance that must be copied

~ComplexFFT()

Destructor

ComplexFFT &operator=(const ComplexFFT &from)

Assignement operator

Parameters:

from – The instance to be assigned from

Returns:

a reference to a new object