queso-0.53.0
Fft.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #ifndef UQ_FFT_H
26 #define UQ_FFT_H
27 
28 #include <queso/Environment.h>
29 #include <vector>
30 #include <complex>
31 
32 namespace QUESO {
33 
59 /* If the function to be transformed is not
60  harmonically related to the sampling frequency, the response of an FFT looks like a sinc
61  function (although the integrated power is still correct). Aliasing (also known as leakage)
62  can be reduced by apodization using an apodization function. However, aliasing reduction
63  is at the expense of broadening the spectral response.*/
64 
65 template <class T>
66 class Fft
67 {
68 public:
70 
71  Fft(const BaseEnvironment& env);
73 
75  ~Fft();
77 
79 
80 
90  void forward(const std::vector<T>& data,
91  unsigned int fftSize,
92  std::vector<std::complex<double> >& result);
93 
95 
105  void inverse(const std::vector<T>& data,
106  unsigned int fftSize,
107  std::vector<std::complex<double> >& result);
109 private:
110  //void allocTables(unsigned int fftSize);
111  //void freeTables ();
112 
114  //unsigned int m_fftSize;
115 
116  //gsl_fft_real_workspace* m_realWkSpace;
117  //gsl_fft_real_wavetable* m_realWvTable;
118  //gsl_fft_complex_workspace* m_complexWkSpace;
119  //gsl_fft_complex_wavetable* m_complexWvTable;
120 };
121 
122 } // End namespace QUESO
123 
124 #endif // UQ_FFT_H
void inverse(const std::vector< T > &data, unsigned int fftSize, std::vector< std::complex< double > > &result)
Calculates the inverse Fourier transform for real and complex data.
Fft(const BaseEnvironment &env)
Default Constructor.
Definition: Fft.C:31
~Fft()
Destructor.
Definition: Fft.C:38
const BaseEnvironment & m_env
Definition: Fft.h:113
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
void forward(const std::vector< T > &data, unsigned int fftSize, std::vector< std::complex< double > > &result)
Calculates the forward Fourier transform (for real data. TODO: complex data).
Class for a Fast Fourier Transform (FFT) algorithm.
Definition: Fft.h:66

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5