OpenIndy-Core  0.2.0.43
laarmadillo.h
Go to the documentation of this file.
1 #ifndef LAARMADILLO_H
2 #define LAARMADILLO_H
3 
4 #include <QDebug>
5 
6 #include "linearalgebra.h"
7 #include "oivec.h"
8 #include "oimat.h"
9 #include "armadillo"
10 
11 #include "global.h"
12 
13 namespace oi{
14 namespace math{
15 
21 {
22 public:
23  LAArmadillo();
24  ~LAArmadillo();
25 
26  void addIn(OiVec &result, const OiVec &v1, const OiVec &v2);
27  void addIn(OiMat &result, const OiMat &m1, const OiMat &m2);
28  void substract(OiVec &result, const OiVec &v1, const OiVec &v2);
29  void substract(OiMat &result, const OiMat &m1, const OiMat &m2);
30  void multiply(OiMat &result, const OiMat &m1, const OiMat &m2);
31  void multiply(OiVec &result, const OiMat &m, const OiVec &v);
32  void multiply(OiMat &result, const double &s, const OiMat &m);
33  void multiply(OiVec &result, const double &s, const OiVec &v);
34  bool invert(OiMat &result, const OiMat &m);
35  void transpose(OiMat &result, const OiMat &m);
36  bool svd(OiMat &u, OiVec &d, OiMat &v, const OiMat &x);
37  void cross(OiVec &result, const OiVec &a, const OiVec &b);
38  void dot(double &result, const OiVec &a, const OiVec &b);
39  void det(double &result, const OiMat &a);
40  bool solve(OiVec &x, const OiMat &A, const OiVec &b);
41  bool solve(OiMat &X, const OiMat &A, const OiMat &B);
42 
43 private:
44  void oiVec2Arma(arma::vec &result, const OiVec &v);
45  void oiMat2Arma(arma::mat &result, const OiMat &m);
46  void arma2OiVec(OiVec &result, const arma::vec &v);
47  void arma2OiMat(OiMat &result, const arma::mat &m);
48 
49 };
50 
51 }
52 }
53 
54 #endif // LAARMADILLO_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
#define OI_MATH_EXPORT
Definition: global.h:9
The LAArmadillo class LinearAlgebra implementation using the armadillo library.
Definition: laarmadillo.h:20