1 | #ifndef FFTServerIntf_H_SEEN
|
---|
2 | #define FFTServerIntf_H_SEEN
|
---|
3 |
|
---|
4 | #include "machdefs.h"
|
---|
5 | #include "pexceptions.h"
|
---|
6 | #include <complex>
|
---|
7 | #include "tmatrix.h"
|
---|
8 | #include "tvector.h"
|
---|
9 |
|
---|
10 | // Classe definissant l'interface pour les transformees de Fourier
|
---|
11 | // L'implementation par defaut est vide et lance une exception
|
---|
12 |
|
---|
13 | namespace SOPHYA {
|
---|
14 |
|
---|
15 | class FFTServerInterface {
|
---|
16 | public:
|
---|
17 |
|
---|
18 | // Methodes de la classe
|
---|
19 | FFTServerInterface(string info);
|
---|
20 | virtual ~FFTServerInterface();
|
---|
21 |
|
---|
22 |
|
---|
23 | virtual FFTServerInterface * Clone() = 0;
|
---|
24 |
|
---|
25 | inline void setNormalize(bool fg=false) { _fgnorm = fg; }
|
---|
26 | inline bool getNormalize() const { return(_fgnorm); }
|
---|
27 | inline string getInfo() const { return _info; }
|
---|
28 |
|
---|
29 | // Transforme unidimensionnel sur des doubles
|
---|
30 | virtual void FFTForward(TVector< complex<r_8> > const & in, TVector< complex<r_8> > & out);
|
---|
31 | virtual void FFTBackward(TVector< complex<r_8> > const & in, TVector< complex<r_8> > & out);
|
---|
32 | virtual void FFTForward(TVector< r_8 > const & in, TVector< complex<r_8> > & out);
|
---|
33 | virtual void FFTBackward(TVector< complex<r_8> > const & in, TVector< r_8 > & out);
|
---|
34 |
|
---|
35 | // Transforme unidimensionnel sur des float
|
---|
36 | virtual void FFTForward(TVector< complex<r_4> > const & in, TVector< complex<r_4> > & out);
|
---|
37 | virtual void FFTBackward(TVector< complex<r_4> > const & in, TVector< complex<r_4> > & out);
|
---|
38 | virtual void FFTForward(TVector< r_4 > const & in, TVector< complex<r_4> > & out);
|
---|
39 | virtual void FFTBackward(TVector< complex<r_4> > const & in, TVector< r_4 > & out);
|
---|
40 |
|
---|
41 |
|
---|
42 | //---------------------------------------------------
|
---|
43 | // Transforme 2D sur des doubles
|
---|
44 | virtual void FFTForward(TMatrix< complex<r_8> > const & in, TMatrix< complex<r_8> > & out);
|
---|
45 | virtual void FFTBackward(TMatrix< complex<r_8> > const & in, TMatrix< complex<r_8> > & out);
|
---|
46 | virtual void FFTForward(TMatrix< r_8 > const & in, TMatrix< complex<r_8> > & out);
|
---|
47 | virtual void FFTBackward(TMatrix< complex<r_8> > const & in, TMatrix< r_8 > & out);
|
---|
48 |
|
---|
49 | // Transforme 2D sur des float
|
---|
50 | virtual void FFTForward(TMatrix< complex<r_4> > const & in, TMatrix< complex<r_4> > & out);
|
---|
51 | virtual void FFTBackward(TMatrix< complex<r_4> > const & in, TMatrix< complex<r_4> > & out);
|
---|
52 | virtual void FFTForward(TMatrix< r_4 > const & in, TMatrix< complex<r_4> > & out);
|
---|
53 | virtual void FFTBackward(TMatrix< complex<r_4> > const & in, TMatrix< r_4 > & out);
|
---|
54 |
|
---|
55 | // Methodes statiques pour reordonner les donnees
|
---|
56 | virtual void ReShapetoReal( TVector< complex<r_8> > const & in, TVector< r_8 > & out);
|
---|
57 | virtual void ReShapetoReal( TVector< complex<r_4> > const & in, TVector< r_4 > & out);
|
---|
58 |
|
---|
59 | virtual void ReShapetoCompl(TVector< r_8 > const & in, TVector< complex<r_8> > & out);
|
---|
60 | virtual void ReShapetoCompl(TVector< r_4 > const & in, TVector< complex<r_4> > & out);
|
---|
61 |
|
---|
62 |
|
---|
63 | protected:
|
---|
64 | bool _fgnorm;
|
---|
65 | string _info;
|
---|
66 | };
|
---|
67 |
|
---|
68 | } // Fin du namespace
|
---|
69 |
|
---|
70 | #endif
|
---|