C++ main module for emicrom Package  1.0
MATH_Matrix.h
Go to the documentation of this file.
1 #ifndef MATH_Matrix_H
2 #define MATH_Matrix_H
3 
4 #include "CORE_Object.h"
5 #include "CORE_Integer.h"
6 
7 
8 #include "MATH_Vector.h"
9 #include "MATH_MaskVector.h"
10 #include "CORE_Exception.h"
11 
19 
20 class MATH_Matrix : public virtual CORE_Object {
22 
23 protected:
26  MATH_Matrix(void) {
27 
28  }
29 
30 
31 
32  // DESTRUCTORS
33 
34 
37  virtual ~MATH_Matrix(void) {
38  }
39 
40 public:
41  //builders
42  //========
43 
47  virtual SP::MATH_Matrix NewInstance() const=0;
48 
49  //SET methods
50  //============
51 
56  virtual void setSize(const tUIndex& r,const tUIndex& c)=0;
57 
58  //GET methods
59  //============
68  virtual tULLInt getMemorySize() const {
69  return 0;
70  }
74  virtual tUIndex getRowsNumber() const=0;
75 
79  virtual tUIndex getColumnsNumber() const=0;
80 
85  tBoolean isSymmetric(const tReal& eps,const MATH_Vector& w) const;
86 
87  //ARITHMETIC methods
88  //===================
89 
96  virtual void product(const tReal& alpha,const MATH_Vector& x,const tReal& beta, MATH_Vector& y) const =0;
97 
98 
106  virtual void product(const tReal& alpha,const MATH_Vector& x,MATH_Vector& y) const=0;
107 
112  virtual void product(const MATH_Vector& x,MATH_Vector& y) const=0;
113 
114 
115 
116 
117  //conditonner
118  //===========
119 
120 public:
127  virtual const MATH_Vector& conditioning(const MATH_Vector& x) const {
128  return x;
129  }
130 
131 
132  //string representation
135  virtual tString toString() const;
136 };
137 #endif
virtual ~MATH_Matrix(void)
destroy a matrix
Definition: MATH_Matrix.h:37
MATH_Matrix(void)
create a matrix
Definition: MATH_Matrix.h:26
virtual void setSize(const tUIndex &r, const tUIndex &c)=0
set the size of the matrix
SP_OBJECT(MATH_Matrix)
This class describes a general matrix interface used in solver.
Definition: MATH_Matrix.h:20
virtual tUIndex getRowsNumber() const =0
get the rows number of the matrix
virtual const MATH_Vector & conditioning(const MATH_Vector &x) const
conditioning of a vector : suppose A is conditioned by C. It solves
Definition: MATH_Matrix.h:127
#define tBoolean
Definition: types.h:139
virtual SP::MATH_Matrix NewInstance() const =0
return a share pointer to a new instance of this
DEFINE_SPTR(MATH_Matrix)
This class describes a masked vector.
Definition: MATH_Vector.h:16
tBoolean isSymmetric(const tReal &eps, const MATH_Vector &w) const
return true if the matrix is symmetric
Definition: MATH_Matrix.cpp:5
virtual tULLInt getMemorySize() const
return the memory size in byte
Definition: MATH_Matrix.h:68
#define tUIndex
Definition: types.h:126
virtual tString toString() const
Definition: MATH_Matrix.cpp:63
virtual void product(const tReal &alpha, const MATH_Vector &x, const tReal &beta, MATH_Vector &y) const =0
y:=alpha. T . x + beta y where T is this
abstract base class for most classes.
Definition: CORE_Object.h:53
#define tString
Definition: types.h:135
virtual tUIndex getColumnsNumber() const =0
get the columns number of the matrix
#define tULLInt
Definition: types.h:45
#define tReal
Definition: types.h:118