C++ main module for emicrom Package  1.0
MATH_LeafBlockMatrixFullStorage.h
Go to the documentation of this file.
1 #ifndef MATH_LeafBlockMatrixFullStorage_H
2 #define MATH_LeafBlockMatrixFullStorage_H
3 
13 
16 
17 public:
18 
19 
20 
21 private:
22  // ATTRIBUTES
23 
24 
25 
26 
27 
28 
29 protected:
30 
31  // METHOD
32 
33  // CONSTRUCTORS
34 
38 
39  }
40 
41 
42 
43  // DESTRUCTORS
44 
45 
49  }
50 
51 
52 public:
53  // NEW
57  inline static SP::MATH_LeafBlockMatrixFullStorage New() {
58  SP::MATH_LeafBlockMatrixFullStorage ret(new MATH_LeafBlockMatrixFullStorage(),
60  ret->setThis(ret);
61  return ret;
62  };
63 
64 
65 public:
69  virtual SP::MATH_LeafBlockMatrixStorage NewInstance() const {
70  return New();
71  };
72 
73 
74 
80  virtual tUIndex getIndex(const tUIndex& i,const tUIndex& j) const {
81  //A00 A01 A02
82  //A10 A11 A12
83  //A20 A21 A22
84  //A00 A10 A20 A01 A11 121 A02 A12 A22
85  //return j*(getSize())+i;
86  //V1
87  //A02 A01 A00 A12 A11 A10 A22 A21 A20
88  return getDimension()*(i+1)-(j+1);
89  //A00 A01 A02 A10 A11 A12 A20 A21 A22
90  //return i*getSize()+j;
91  //A02 A12 A22 A01 A11 121 A00 A10 A20
92  //return (getSize()-1-j)*getSize()+i;
93  }
97  virtual tUIndex getSize() const {
98  //full
99  return getDimension()*getDimension();
100  }
101 
102 
103 
104 
105  // OTHERS Methods
106 
107 };
108 #endif
Definition: MATH_LeafBlockMatrixFullStorage.h:14
MATH_LeafBlockMatrixFullStorage(void)
create a multi level toeplitz matrix
Definition: MATH_LeafBlockMatrixFullStorage.h:37
static SP::MATH_LeafBlockMatrixFullStorage New()
build a new instance of class
Definition: MATH_LeafBlockMatrixFullStorage.h:57
virtual SP::MATH_LeafBlockMatrixStorage NewInstance() const
return a share pointer to a copy instance of this
Definition: MATH_LeafBlockMatrixFullStorage.h:69
virtual tUIndex getSize() const
get the number of values of the leaf matrix
Definition: MATH_LeafBlockMatrixFullStorage.h:97
DEFINE_SPTR(MATH_LeafBlockMatrixFullStorage)
virtual ~MATH_LeafBlockMatrixFullStorage(void)
destroy a multi level toeplitz matrix
Definition: MATH_LeafBlockMatrixFullStorage.h:48
SP_OBJECT(MATH_LeafBlockMatrixFullStorage)
Definition: MATH_LeafBlockMatrixStorage.h:22
const tUIndex & getDimension() const
get the dimension (number of rows or columns) of the leaf matrix
Definition: MATH_LeafBlockMatrixStorage.h:93
virtual tUIndex getIndex(const tUIndex &i, const tUIndex &j) const
get the index of the row i & column j at the matrix at level 0
Definition: MATH_LeafBlockMatrixFullStorage.h:80
#define tUIndex
Definition: types.h:126
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141