C++ main module for mmsd Package  1.0
LAP_Matrix.h
Go to the documentation of this file.
1 #ifndef LAP_Matrix_H
2 #define LAP_Matrix_H
3 
4 #include "LAP_Object.h"
5 #include "LAP_Vector.h"
6 
7 
15 class LAP_Matrix: public virtual LAP_Object {
16 
17 
18 
19 public:
20  // ATTRIBUTES
21  static const tFlag ROW;
22  static const tFlag COL;
23 
24 
25 
26 
27 private:
28  // ASSOCIATIONS
29 
30 
33  tLVectorIndex mSize[2];
34 
35  // METHODS
36 
37 
38 protected:
39  // CONSTRUCTORS
41  LAP_Matrix();
42 
43  LAP_Matrix(const tLVectorIndex& n,const tLVectorIndex& m);
44 
45 
46 
47  // DESTRUCTORS
50  virtual ~LAP_Matrix();
51 
52 
53 
54 public:
55  // -----------------------
56  // shared pointer operator
57  // ------------------------
58 public:
59 
60 
61  //-----------
62  // OPERATORS
63  // ----------
64 public:
65 
66  // ----------------
67  // MATRIX SETTINGS
68  // ----------------
69 
70 public:
71 
76  virtual tBoolean copy(const LAP_Matrix& matrix) {
77  mSize[ROW]=matrix.getSize(ROW);
78  mSize[COL]=matrix.getSize(COL);
79  return true;
80  }
81 
82 public:
83 
87  virtual void setSize(const tLVectorIndex& n,const tLVectorIndex& p) {
88  mSize[ROW]=n;
89  mSize[COL]=p;
90  }
94  virtual void setSize(const tLVectorIndex& n) {
95  mSize[ROW]=n;
96  mSize[COL]=n;
97  }
98 
99 
100 
101 
102 
103  // GET
104 
105 
108  inline const tLVectorIndex & getSize(const tFlag& direction) const {
109  return mSize[direction];
110  };
111 
112 
113 
116  virtual tLVectorIndex getRowsNumber() const {
117  return getSize(ROW);
118  };
121  virtual tLVectorIndex getColumnsNumber() const {
122  return getSize(COL);
123  };
124 
125 
126 
127 
128 
129 
130 
131 };
132 
133 #endif
static const tFlag COL
Definition: LAP_Matrix.h:22
LAP_Matrix()
build a matrix
Definition: LAP_Matrix.cpp:6
virtual void setSize(const tLVectorIndex &n, const tLVectorIndex &p)
set the dimension of the matrix n x p
Definition: LAP_Matrix.h:87
virtual ~LAP_Matrix()
destroy a matrix
Definition: LAP_Matrix.cpp:15
#define tBoolean
Definition: types.h:48
virtual tBoolean copy(const LAP_Matrix &matrix)
copy operator
Definition: LAP_Matrix.h:76
static const tFlag ROW
Definition: LAP_Matrix.h:21
This class is the base class of all lapack objects.
Definition: LAP_Object.h:17
virtual void setSize(const tLVectorIndex &n)
set the dimension of the matrix n x p
Definition: LAP_Matrix.h:94
const tLVectorIndex & getSize(const tFlag &direction) const
get the size in direction
Definition: LAP_Matrix.h:108
#define tLVectorIndex
Definition: lapack_types.h:13
virtual tLVectorIndex getColumnsNumber() const
get the columns number of the matrix from view
Definition: LAP_Matrix.h:121
this class describes a general matrix for lapack used : the matrix is stored in column mValues={T_{0...
Definition: LAP_Matrix.h:15
virtual tLVectorIndex getRowsNumber() const
get the lines number of the matrix from view
Definition: LAP_Matrix.h:116
#define tFlag
Definition: types.h:14