OpenWareLaboratory
ShortFastFourierTransform Class Reference

This class performs direct and inverse ShortFast Fourier Transform. More...

Public Member Functions

void fft (ShortArray input, ComplexShortArray output)
 Perform the direct FFT. More...
 
int getSize ()
 Get the size of the FFT. More...
 
void ifft (ComplexShortArray input, ShortArray output)
 Perform the inverse FFT. More...
 
void init (int aSize)
 Initialize the instance. More...
 
 ShortFastFourierTransform ()
 Default constructor. More...
 
 ShortFastFourierTransform (int aSize)
 Construct and initialize the instance. More...
 
 ~ShortFastFourierTransform ()
 

Detailed Description

This class performs direct and inverse ShortFast Fourier Transform.

Definition at line 14 of file ShortFastFourierTransform.h.

Constructor & Destructor Documentation

ShortFastFourierTransform::ShortFastFourierTransform ( )

Default constructor.

Does not initialize the instance.

Remarks
You need to call init(int size) before calling any other method

Definition at line 43 of file ShortFastFourierTransform.cpp.

ShortFastFourierTransform::ShortFastFourierTransform ( int  aSize)

Construct and initialize the instance.

Parameters
[in]aSizeThe size of the FFT
Remarks
Only sizes of 32, 64, 128, 256, 512, 1024, 2048, 4096 are supported, due to limitations of the CMSIS library.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 45 of file ShortFastFourierTransform.cpp.

References init().

ShortFastFourierTransform::~ShortFastFourierTransform ( )

Definition at line 49 of file ShortFastFourierTransform.cpp.

References ComplexShortArray::destroy().

Member Function Documentation

void ShortFastFourierTransform::fft ( ShortArray  input,
ComplexShortArray  output 
)

Perform the direct FFT.

Parameters
[in]inputThe real-valued input array
[out]outputThe complex-valued output array
Remarks
Calling this method will mess up the content of the input array.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 61 of file ShortFastFourierTransform.cpp.

References ASSERT, ComplexShortArray::getData(), ShortArray::getSize(), getSize(), ComplexShortArray::getSize(), ComplexShortArray::im(), and ComplexShortArray::re().

int ShortFastFourierTransform::getSize ( )

Get the size of the FFT.

Returns
The size of the FFT

Definition at line 81 of file ShortFastFourierTransform.cpp.

References ComplexShortArray::getSize().

Referenced by fft(), ifft(), and init().

void ShortFastFourierTransform::ifft ( ComplexShortArray  input,
ShortArray  output 
)

Perform the inverse FFT.

The output is rescaled by 1/fftSize.

Parameters
[in]inputThe complex-valued input array
[out]outputThe real-valued output array
Remarks
Calling this method will mess up the content of the input array.
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 71 of file ShortFastFourierTransform.cpp.

References ASSERT, ComplexShortArray::getData(), ShortArray::getSize(), getSize(), ComplexShortArray::getSize(), and ComplexShortArray::re().

void ShortFastFourierTransform::init ( int  aSize)

Initialize the instance.

Parameters
aSizeThe size of the FFT
Note
When built for ARM Cortex-M processor series, this method uses the optimized CMSIS library

Definition at line 54 of file ShortFastFourierTransform.cpp.

References ASSERT, ComplexShortArray::create(), and getSize().

Referenced by ShortFastFourierTransform().


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