DFTServer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SCIMATH_DFTSERVER_H
00029 #define SCIMATH_DFTSERVER_H
00030
00031
00032 #include <casacore/casa/aips.h>
00033 #include <casacore/casa/BasicMath/Math.h>
00034 #include <casacore/casa/Exceptions/Error.h>
00035 #include <casacore/casa/Arrays/Array.h>
00036 #include <casacore/casa/Arrays/ArrayMath.h>
00037 #include <casacore/casa/Arrays/ArrayIter.h>
00038 #include <casacore/casa/Arrays/ArrayIO.h>
00039 #include <casacore/casa/BasicSL/Constants.h>
00040 #include <casacore/casa/math.h>
00041
00042 namespace casacore {
00043
00044 template<class T> class Matrix;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 class DFTError: public AipsError
00055 {
00056 public:
00057 DFTError(): AipsError("DFTError") {}
00058 DFTError(const Char *m) : AipsError(m) {}
00059 DFTError(const String &m) : AipsError(m) {}
00060
00061 virtual ~DFTError() throw() {}
00062 };
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074 template<class T>
00075 class DFTServer
00076 {
00077 public:
00078
00079 DFTServer();
00080
00081
00082 DFTServer(const DFTServer<T> &);
00083
00084
00085
00086 DFTServer(Array<T> &, Array<T> &);
00087 DFTServer(int, int, int);
00088 DFTServer(IPosition &, IPosition &);
00089
00090
00091
00092 ~DFTServer();
00093
00094
00095 DFTServer<T> &operator=(const DFTServer<T> &);
00096
00097
00098 void rcdft(Array<T> &, Array<T> &);
00099
00100
00101 void crdft(Array<T> &, Array<T> &);
00102
00103
00104 void cxdft(Array<T> &, Array<T> &, int);
00105
00106
00107 void showReal(Array<T> &);
00108
00109
00110 void showComplex(Array<T> &);
00111
00112 private:
00113
00114 int dimension;
00115
00116
00117 int numTime;
00118
00119
00120 int numFreq;
00121
00122
00123 int crFlag;
00124
00125
00126
00127 void c2c(Matrix<T> &, Matrix<T> &, int);
00128
00129
00130 Matrix<T> getMatrix(Array<T> &);
00131
00132 };
00133
00134
00135 }
00136
00137 #ifndef CASACORE_NO_AUTO_TEMPLATES
00138 #include <casacore/scimath/Mathematics/DFTServer.tcc>
00139 #endif //# CASACORE_NO_AUTO_TEMPLATES
00140 #endif //DFT_SERVER