C++ main module for emicrom Package  1.0
MATH_FullMatrix.h
Go to the documentation of this file.
1 #ifndef MATH_FullMatrix_H
2 #define MATH_FullMatrix_H
3 
4 #include "MATH_MaskMatrix.h"
5 
6 #include "CORE_Array.h"
7 
8 #include "MATH_MaskVector.h"
9 
10 
18 
21 
22 private:
23 
24 
25  //index of values by row
27 
30 
31 protected:
35  mRowsNumber=0;
36  }
37 
38 
39 
40  // DESTRUCTORS
41 
42 
45  virtual ~MATH_FullMatrix(void) {
46  }
47 
48 public:
52  inline static SP::MATH_FullMatrix New() {
53  SP::MATH_FullMatrix p(new MATH_FullMatrix(),MATH_FullMatrix::Delete());
54  p->setThis(p);
55  return p;
56  }
60  virtual SP::MATH_Matrix NewInstance() const {
61  return New();
62  }
63 
64 
65  //SET Methods
66  //===========
67 
72  virtual void setSize(const tUIndex& r,const tUIndex& c) {
73  mRowsNumber=r;
74  mColumnsNumber=c;
75  mValues.setSize(r*c);
76  }
77 
78 
83  void setValues(const tUIndex& n,const tReal* vs);
84 
85 
86  //GET Methods
87  //===========
88 
92  virtual tUIndex getRowsNumber() const {
93  return mRowsNumber;
94  }
98  virtual tUIndex getColumnsNumber() const {
99  return mColumnsNumber;
100  }
101 
107  return mValues;
108  }
113  inline const CORE_RealArray& getValues() const {
114  return mValues;
115  }
124  virtual tULLInt getMemorySize() const {
126  mValues.getMemorySize();
127  }
128  //arithmetic methods
129  //===================
130 protected:
140  virtual void product(const tUIndex& n,
141  const tReal& beta,
142  const tUSInt& incX,const tReal* x,
143  const tReal& alpha,
144  const tUSInt& incY,tReal* y) const;
152  virtual void product(const tReal& alpha,
153  const tUSInt& incX,const tReal* x,
154  const tUSInt& incY,tReal* y) const;
155 
162  virtual void product(const tUSInt& incX,const tReal* x,
163  const tUSInt& incY,tReal* y) const;
164 
165 
166 public:
170  virtual tString toString() const;
171 
172 
173 
174 
175 };
176 #endif
MATH_FullMatrix(void)
create a vector
Definition: MATH_FullMatrix.h:34
DEFINE_SPTR(MATH_FullMatrix)
const CORE_RealArray & getValues() const
get the values of the matrix
Definition: MATH_FullMatrix.h:113
#define tUSInt
Definition: types.h:28
CORE_RealArray & getValues()
get the values of the matrix
Definition: MATH_FullMatrix.h:106
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: MATH_FullMatrix.h:124
void setSize(const tUIndex &n)
set the size
Definition: CORE_Array.h:292
tUIndex mRowsNumber
Definition: MATH_FullMatrix.h:28
static SP::MATH_FullMatrix New()
return a share pointer of a vector based on CORE_RealArray
Definition: MATH_FullMatrix.h:52
virtual tUIndex getColumnsNumber() const
return the number of columns of the matrix
Definition: MATH_FullMatrix.h:98
virtual SP::MATH_Matrix NewInstance() const
return a share pointer to a new instance of this
Definition: MATH_FullMatrix.h:60
This class impements the MATH_MaskMatrix whci deals with mask vector.
Definition: MATH_MaskMatrix.h:19
virtual void product(const tUIndex &n, const tReal &beta, const tUSInt &incX, const tReal *x, const tReal &alpha, const tUSInt &incY, tReal *y) const
y:=alpha.y+beta. T . x where T is this
Definition: MATH_FullMatrix.cpp:19
CORE_RealArray mValues
Definition: MATH_FullMatrix.h:26
tUIndex mColumnsNumber
Definition: MATH_FullMatrix.h:29
virtual tUIndex getRowsNumber() const
return the number of rows of the matrix
Definition: MATH_FullMatrix.h:92
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: CORE_Array.h:545
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: MATH_Matrix.h:68
#define tUIndex
Definition: types.h:126
SP_OBJECT(MATH_FullMatrix)
virtual ~MATH_FullMatrix(void)
destroy a vector
Definition: MATH_FullMatrix.h:45
This class impements the MATH_Matrix class thanks to CORE_RealArray data.
Definition: MATH_FullMatrix.h:19
#define tString
Definition: types.h:135
virtual void setSize(const tUIndex &r, const tUIndex &c)
set the size of the matrix
Definition: MATH_FullMatrix.h:72
virtual tString toString() const
return the string representation of the class
Definition: MATH_FullMatrix.cpp:253
#define tULLInt
Definition: types.h:45
void setValues(const tUIndex &n, const tReal *vs)
set the values of the full matrix by row thanks to values of the vector vs of size n ...
Definition: MATH_FullMatrix.cpp:7
#define tReal
Definition: types.h:118
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141