C++ main module for emicrom Package  1.0
MATH_ElementaryMultiLevelsToeplitzMatrix.h
Go to the documentation of this file.
1 #ifndef MATH_ElementaryMultiLevelsToeplitzMatrix_H
2 #define MATH_ElementaryMultiLevelsToeplitzMatrix_H
3 
5 
8 
30 
33 
34 public:
35 
36 
37 
38 private:
39 
40  mutable SP::FFTW_FFT mWork;
41 
42 protected:
43 
44  // METHOD
45 
46  // CONSTRUCTORS
47 
51 
52 
53 
54  // DESTRUCTORS
55 
56 
60 
61 
62 public:
63 
64 
65  //copy
69  virtual void copy(const MATH_MultiLevelsToeplitzMatrix& mat) {
71  }
72 
73 
74  // SET methods
75 
79  inline void setStorage(const tString& storage) {
80  if (storage.compare("packed")==0) {
82  } else {
84  }
85  }
86 
87 public:
88 
89 
90 
91  // GET methods
100  virtual tULLInt getMemorySize() const {
102  ((mWork.get()==null)?0:mWork->getMemorySize());
103 
104  }
105 
106 
107  // diagonalization methods
108  //=========================
109 
110 protected:
117  const tUSInt& d,
118  CORE_UIndexArray& Ms) const=0;
119 
126  virtual void buildSpectralVectorProjector(FFTW_FFT& proj) const;
127 
134  virtual void buildSpectralSpace();
135 
138  virtual void recoverCanonicalSpace();
139 
144  virtual void buildColumnLeadingDimensions();
145 
150  virtual void buildRowLeadingDimensions();
151 
152 private:
157  virtual tUIndex getElementIndex(const tUIndex& i,
158  const tUIndex& j) const;
159 private:
168  const tUIndex& j,
169  const tUSInt& level,
170  const tUIndex& nRows,
171  tUIndex& nValues) const;
172 
173 
174 
175 
176 
177  //product in spectral space methods
178  //==================================
179 protected:
190  virtual void vectorProductInSpectralSpace(const FFTW_FFT& A,FFTW_FFT& Z) const;
191 
198  virtual void projectIntoSpectralSpace(const tUIndex& N,const tReal* X) const;
199 
206  virtual void recoverFromSpectralSpace(const tUIndex& N,tReal* X) const;
207 
208 
209 
210 
211 
212 
213 };
214 #endif
virtual void recoverFromSpectralSpace(const tUIndex &N, tReal *X) const
recover Y from multi levels space to the initial space
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:444
DEFINE_SPTR(MATH_ElementaryMultiLevelsToeplitzMatrix)
void setStorage(SP::MATH_LeafBlockMatrixStorage storage)
set the storage of the matrix
Definition: MATH_MultiLevelsToeplitzMatrix.h:196
static SP::MATH_LeafBlockMatrixPackedStorage New()
build a new instance of class
Definition: MATH_LeafBlockMatrixPackedStorage.h:59
static SP::MATH_LeafBlockMatrixFullStorage New()
build a new instance of class
Definition: MATH_LeafBlockMatrixFullStorage.h:57
This class is multi level toeplitz matrix whose product with vector is based on FFT; It delas with th...
Definition: MATH_MultiLevelsFFTToeplitzMatrix.h:24
MATH_ElementaryMultiLevelsToeplitzMatrix(void)
create a multi level toeplitz matrix
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:7
This class manages the execution of Fast Fourier Transform. several fast Fourier Transforms may be ap...
Definition: FFTW_FFT.h:28
void setStorage(const tString &storage)
set storage of the leaf block matrix.
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.h:79
This class is multi levels toeplitz matrix. The matrix at level k is composed by toeplitz block matr...
Definition: MATH_MultiLevelsToeplitzMatrix.h:57
virtual void buildRowLeadingDimensions()
build the row indices
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:343
virtual void recoverCanonicalSpace()
recover the canonical space from the spectral space : do the reverse procedure of buildSpectralSpace(...
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:108
#define tUSInt
Definition: types.h:28
virtual void copy(const MATH_MultiLevelsToeplitzMatrix &mat)
copy the instance
Definition: MATH_MultiLevelsToeplitzMatrix.cpp:29
#define null
Definition: types.h:144
virtual ~MATH_ElementaryMultiLevelsToeplitzMatrix(void)
destroy a multi level toeplitz matrix
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:13
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: MATH_MultiLevelsFFTToeplitzMatrix.h:113
virtual void projectIntoSpectralSpace(const tUIndex &N, const tReal *X) const
project the vector X from initial space to multi levels space
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:382
virtual void vectorProductInSpectralSpace(const FFTW_FFT &A, FFTW_FFT &Z) const
make the vector product in spectral space
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:207
This class is a multi level toeplitz matrix whose leaf block are packed/full matrix of dimension D an...
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.h:31
virtual void buildSpectralVectorProjector(FFTW_FFT &proj) const
build the projector of vector in spectral spce
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:183
virtual tUIndex getElementIndex(const tUIndex &i, const tUIndex &j) const
return the index in values of the multi levels toeplitz matrix of the element at row i and j when lea...
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:244
SP_OBJECT(MATH_ElementaryMultiLevelsToeplitzMatrix)
SP::FFTW_FFT mWork
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.h:40
#define tUIndex
Definition: types.h:126
virtual void copy(const MATH_MultiLevelsToeplitzMatrix &mat)
copy the matrix mat
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.h:69
#define tString
Definition: types.h:135
virtual tUIndex computeSpectralSpaceSizePerDimension(const tUIndex &s, const tUSInt &d, CORE_UIndexArray &Ms) const =0
compute the size of spectral space for each dimension
virtual void buildColumnLeadingDimensions()
build the column leading dimensions
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:304
virtual void buildSpectralSpace()
build the spectral space
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.cpp:19
#define tULLInt
Definition: types.h:45
#define tReal
Definition: types.h:118
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: MATH_ElementaryMultiLevelsToeplitzMatrix.h:100