00001
00002
00003
00004
00005
00006
00007 #ifndef CORRELATION_H
00008 #define CORRELATION_H
00009
00010 #include "fftw3.h"
00011
00014 class Correlation
00015 {
00016 public:
00018 Correlation(int N);
00019 ~Correlation();
00020
00023 void correlateWithShift (int N,
00024 const double function1 [],
00025 const double function2 [],
00026 int &binStartMax,
00027 double &corrMax,
00028 double correlations []) const;
00029
00032 void correlateWithoutShift (int N,
00033 const double function1 [],
00034 const double function2 [],
00035 double &corrMax) const;
00036
00037 private:
00038 Correlation();
00039
00040 int m_N;
00041
00042 fftw_complex *m_signalA;
00043 fftw_complex *m_signalB;
00044 fftw_complex *m_outShifted;
00045 fftw_complex *m_outA;
00046 fftw_complex *m_outB;
00047 fftw_complex *m_out;
00048
00049 fftw_plan m_planA;
00050 fftw_plan m_planB;
00051 fftw_plan m_planX;
00052 };
00053
00054 #endif // CORRELATION_H