gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
class RealFFTData controls and manipulates fft data More...
#include <RealFFTData.H>
Public Member Functions | |
RealFFTData (int sz) | |
All memory to be allocated internally. More... | |
RealFFTData (int sz, fftw_real *inp, fftw_real *outp) | |
input and output data arrays are to be allocated by another process More... | |
~RealFFTData (void) | |
Deconstructor. More... | |
int | limitHalfPowerSpec (double lim) |
Limits the maximum to 'lim' and returns the last fft bin with max. More... | |
int | getSize (void) |
Returns the number of elements in the input and output arrays. More... | |
int | getHalfSize (void) |
Returns the number of elements in the power spectrum array. More... | |
fftw_real | findMaxIn (void) |
Returns the maximum input variable. More... | |
void | findMaxMinPowerBins (void) |
Fills the max and min power spectrum bins. More... | |
int | compPowerSpec () |
This function computes the power spectrum and returns the max bin. More... | |
int | sqrtPowerSpec () |
This function computes the square root of the power spectrum and returns the max bin. More... | |
void | powerInDB () |
This is the power spectrum in dB. More... | |
void | zeroFFTData (void) |
This function zeros the output data array (out) More... | |
void | load (const unsigned int i, const fftw_real val) |
fftw_real | unload (const unsigned int i) |
fftw_real | unloadPS (const unsigned int i) |
void | dumpIn () |
For debugging purposes, dump the in array to stdout. More... | |
void | dumpOut () |
For debugging purposes, dump the out array to stdout. More... | |
Public Attributes | |
int | size |
Specifies the size of the data array. More... | |
int | minPowerBin |
Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPowerSpec. More... | |
int | maxPowerBin |
fftw_real * | in |
the input, output and power_spectrum arrays More... | |
fftw_real * | out |
fftw_real * | power_spectrum |
double | totalPower |
The total power (summed) of the power spectrum as used in the method compPowerSpec. More... | |
Private Attributes | |
int | deleteInOutMemory |
Var used to specify if the memory was allocated by the RealFFTData class. More... | |
class RealFFTData controls and manipulates fft data
Definition at line 24 of file RealFFTData.H.
RealFFTData::RealFFTData | ( | int | sz | ) |
All memory to be allocated internally.
Definition at line 24 of file RealFFTData.C.
input and output data arrays are to be allocated by another process
Definition at line 45 of file RealFFTData.C.
RealFFTData::~RealFFTData | ( | void | ) |
Deconstructor.
Definition at line 68 of file RealFFTData.C.
int RealFFTData::compPowerSpec | ( | ) |
This function computes the power spectrum and returns the max bin.
Definition at line 117 of file RealFFTData.C.
void RealFFTData::dumpIn | ( | ) |
For debugging purposes, dump the in array to stdout.
Definition at line 215 of file RealFFTData.C.
void RealFFTData::dumpOut | ( | ) |
For debugging purposes, dump the out array to stdout.
Definition at line 221 of file RealFFTData.C.
fftw_real RealFFTData::findMaxIn | ( | void | ) |
Returns the maximum input variable.
Definition at line 80 of file RealFFTData.C.
void RealFFTData::findMaxMinPowerBins | ( | void | ) |
Fills the max and min power spectrum bins.
Definition at line 90 of file RealFFTData.C.
|
inline |
Returns the number of elements in the power spectrum array.
Definition at line 50 of file RealFFTData.H.
|
inline |
Returns the number of elements in the input and output arrays.
Definition at line 48 of file RealFFTData.H.
int RealFFTData::limitHalfPowerSpec | ( | double | lim | ) |
Limits the maximum to 'lim' and returns the last fft bin with max.
Definition at line 104 of file RealFFTData.C.
void RealFFTData::load | ( | const unsigned int | i, |
const fftw_real | val | ||
) |
load the input data.
i | The index to load into. |
val | The value to load into in[i] |
Definition at line 198 of file RealFFTData.C.
void RealFFTData::powerInDB | ( | ) |
This is the power spectrum in dB.
Definition at line 155 of file RealFFTData.C.
int RealFFTData::sqrtPowerSpec | ( | ) |
This function computes the square root of the power spectrum and returns the max bin.
Definition at line 143 of file RealFFTData.C.
fftw_real RealFFTData::unload | ( | const unsigned int | i | ) |
unload the output data.
i | The index to load into. |
Definition at line 203 of file RealFFTData.C.
fftw_real RealFFTData::unloadPS | ( | const unsigned int | i | ) |
unload the power_spectrum data.
i | The index to load into. |
Definition at line 209 of file RealFFTData.C.
void RealFFTData::zeroFFTData | ( | void | ) |
This function zeros the output data array (out)
Definition at line 192 of file RealFFTData.C.
|
private |
Var used to specify if the memory was allocated by the RealFFTData class.
Definition at line 26 of file RealFFTData.H.
fftw_real* RealFFTData::in |
the input, output and power_spectrum arrays
Definition at line 33 of file RealFFTData.H.
int RealFFTData::maxPowerBin |
Definition at line 31 of file RealFFTData.H.
int RealFFTData::minPowerBin |
Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPowerSpec.
Definition at line 31 of file RealFFTData.H.
fftw_real * RealFFTData::out |
Definition at line 33 of file RealFFTData.H.
fftw_real * RealFFTData::power_spectrum |
Definition at line 33 of file RealFFTData.H.
int RealFFTData::size |
Specifies the size of the data array.
Definition at line 29 of file RealFFTData.H.
double RealFFTData::totalPower |
The total power (summed) of the power spectrum as used in the method compPowerSpec.
Definition at line 35 of file RealFFTData.H.
GTK+ IOStream
Beta
|