00001
00002
00004 #ifndef __fft__
00005 #define __fft__
00006
00007 #include "CUtils.h"
00008
00009
00010 #ifdef __CINT__
00011 typedef struct {char a[7];} __float128;
00012 #endif
00013 #include "fftw3.h"
00014
00015 using namespace std;
00016
00017
00022 class fft {
00023
00024 public:
00025
00036 fft(const int asize, const string aplan = "FFTW_ESTIMATE");
00037
00041 virtual ~fft(void);
00052 bool Forward(double *aReDataIn=NULL, double *aImDataIn=NULL);
00053
00060 bool Backward(double *aReDataIn=NULL, double *aImDataIn=NULL);
00061
00067 double* GetNorm2(void);
00068
00074 double* GetNorm(void);
00075
00081 double* GetRe(void);
00082
00088 double* GetIm(void);
00089
00095 double* GetPhase(void);
00096
00097 private:
00098 int fSize;
00099 string fPlan;
00100
00101 fftw_complex* FFTin;
00102 fftw_complex* FFTout;
00103 fftw_plan FFT_Forward;
00104 fftw_plan FFT_Backward;
00105
00106 int last_transform;
00107
00108 };
00109
00110 #endif