OpenIndy-Core  0.2.0.43
linearalgebra.h
Go to the documentation of this file.
1 #ifndef LINEARALGEBRA_H
2 #define LINEARALGEBRA_H
3 
4 #include "oivec.h"
5 #include "oimat.h"
6 
7 #include "global.h"
8 
9 namespace oi{
10 namespace math{
11 
16 {
17 public:
18  virtual ~LinearAlgebra(){}
19 
27  virtual void addIn(OiVec &result, const OiVec &v1, const OiVec &v2) = 0;
28 
36  virtual void addIn(OiMat &result, const OiMat &m1, const OiMat &m2) = 0;
37 
45  virtual void substract(OiVec &result, const OiVec &v1, const OiVec &v2) = 0;
46 
54  virtual void substract(OiMat &result, const OiMat &m1, const OiMat &m2) = 0;
55 
63  virtual void multiply(OiMat &result, const OiMat &m1, const OiMat &m2) = 0;
64 
72  virtual void multiply(OiVec &result, const OiMat &m, const OiVec &v) = 0;
73 
81  virtual void multiply(OiMat &result, const double &s, const OiMat &m) = 0;
82 
90  virtual void multiply(OiVec &result, const double &s, const OiVec &v) = 0;
91 
99  virtual bool invert(OiMat &result, const OiMat &m) = 0;
100 
107  virtual void transpose(OiMat &result, const OiMat &m) = 0;
108 
118  virtual bool svd(OiMat &u, OiVec &d, OiMat &v, const OiMat &x) = 0;
119 
127  virtual void cross(OiVec &result, const OiVec &a, const OiVec &b) = 0;
128 
136  virtual void dot(double &result, const OiVec &a, const OiVec &b) = 0;
137 
144  virtual void det(double &result, const OiMat &a) = 0;
145 
154  virtual bool solve(OiVec &x, const OiMat &A, const OiVec &b) = 0;
155 
164  virtual bool solve(OiMat &X, const OiMat &A, const OiMat &B) = 0;
165 
166 };
167 
168 }
169 }
170 
171 #endif // LINEARALGEBRA_H
The OiVec class.
Definition: oivec.h:22
Definition: coordinatesystem.h:15
The OiMat class.
Definition: oimat.h:58
The LinearAlgebra class.
Definition: linearalgebra.h:15
virtual ~LinearAlgebra()
Definition: linearalgebra.h:18
#define OI_MATH_EXPORT
Definition: global.h:9