29 in = (fftw_complex*)fftw_malloc(
size*
sizeof(fftw_complex));
30 out = (fftw_complex*)fftw_malloc(
size*
sizeof(fftw_complex));
33 printf(
"Could not allocate enough mem for a ComplexFFT\n");
37 if (
in) fftw_free(
in);
52 if (
in) fftw_free(
in);
65 for (
int k = 1; k <
getSize(); ++k) {
83 double max=-MAXDOUBLE;
84 for (
int k = 0; k <
getSize(); ++k) {
int sqrtPowerSpec()
This function computes the square root of the power spectrum and returns the max bin.
fftw_real * power_spectrum
the power_spectrum array
int compPowerSpec()
This function computes the power spectrum and returns the max bin.
fftw_complex * in
the input and output arrays
int getSize()
Returns the number of elements in the input and output arrays.
int size
Specifies the size of the data array.
#define c_re(c)
The real part of the complex number.
~ComplexFFTData(void)
Deconstructor.
ComplexFFTData(int sz)
Constructor with all memory to be allocated internally.
#define c_im(c)
The imaginary part of the complex number.
double totalPower
The total power (summed) of the power spectrum as used in the method compPowerSpec.
int minPowerBin
Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPower...
#define fftw_real
use double by default