Biorbd
Matrix.h
1 #ifndef BIORBD_UTILS_MATRIX_H
2 #define BIORBD_UTILS_MATRIX_H
3 
4 #include "biorbdConfig.h"
5 #include "rbdl_math.h"
6 
7 namespace biorbd {
8 namespace rigidbody {
9 class GeneralizedCoordinates;
10 }
11 
12 namespace utils {
16 #ifdef SWIG
17 class BIORBD_API Matrix
18 #else
19 class BIORBD_API Matrix : public RigidBodyDynamics::Math::MatrixNd
20 #endif
21 {
22 public:
26  Matrix();
27 
28 #ifdef BIORBD_USE_EIGEN3_MATH
29  template<typename OtherDerived> Matrix(const Eigen::MatrixBase<OtherDerived>& other) :
34  Eigen::MatrixXd(other){}
35 #endif
36 #ifdef BIORBD_USE_CASADI_MATH
37 
42  Matrix(
43  const biorbd::utils::Matrix& other);
44 
49  Matrix(
50  const RigidBodyDynamics::Math::MatrixNd& other);
51 
56  Matrix(
57  const RBDLCasadiMath::MX_Xd_SubMatrix& other);
58 
59 #endif
60 
66  Matrix(
67  unsigned int nbRows,
68  unsigned int nbCols);
69 
70 #ifndef SWIG
71 
72 #ifdef BIORBD_USE_EIGEN3_MATH
73  template<typename OtherDerived>
78  biorbd::utils::Matrix& operator=(const Eigen::MatrixBase <OtherDerived>& other){
79  this->Eigen::MatrixXd::operator=(other);
80  return *this;
81  }
82 #endif
83 #ifdef BIORBD_USE_CASADI_MATH
84 
89  void operator=(
90  const biorbd::utils::Matrix& other);
91 
96  void operator=(
97  const RBDLCasadiMath::MX_Xd_SubMatrix& other);
98 #endif
99 
100 #endif
101 };
102 
103 }}
104 
105 #endif // BIORBD_UTILS_MATRIX_H
biorbd::utils::Matrix
A wrapper for the Eigen::MatrixXd.
Definition: Matrix.h:21