Go to the documentation of this file.00001 #ifndef FORIA_FFT_HH
00002 #define FORIA_FFT_HH
00003
00004 #include "ForIA/IFourMomentum.hh"
00005
00006 #include <complex>
00007 #include <vector>
00008
00009 namespace ForIA{
00010
00011 using std::vector;
00012 using std::complex;
00013 class IFourMomentum;
00014
00015 typedef complex<double> Coefficient;
00016 typedef vector<complex<double> > FTCoefficients;
00017
00018 class FFT {
00019
00020 public:
00021
00022 FFT();
00023
00024 bool setGrid(const vector<double> &grid);
00025
00026 const FTCoefficients &coefficients() const;
00027 const vector<double> &magnitudes() const;
00028 const vector<double> &reals() const;
00029 const vector<double> &imaginaries() const;
00030
00031
00032
00033 private:
00034
00035 mutable bool m_freshMagnitudes;
00036 mutable bool m_freshReals;
00037 mutable bool m_freshImgs;
00038
00039 FTCoefficients m_coefficients;
00040 mutable vector<double> m_magnitudes;
00041 mutable vector<double> m_reals;
00042 mutable vector<double> m_imgs;
00043
00044 };
00045 }
00046
00047 #endif