10 #ifndef ApproxMVBB_Common_MyMatrixTypeDefs_hpp 11 #define ApproxMVBB_Common_MyMatrixTypeDefs_hpp 18 #include <Eigen/Dense> 29 template<
typename Scalar>
31 template<
typename Scalar>
33 template<
typename Scalar>
35 template<
typename Scalar>
37 template<
typename Scalar>
39 template<
typename Scalar>
41 template<
typename Scalar>
43 template<
typename Scalar>
44 using Vector3 = Eigen::Matrix<Scalar, 3, 1>;
45 template<
typename Scalar>
46 using Vector2 = Eigen::Matrix<Scalar, 2, 1>;
48 template<
typename Scalar>
50 template<
typename Scalar>
53 template<
typename Scalar>
54 using Vector4 = Eigen::Matrix<Scalar, 4, 1>;
55 template<
typename Scalar>
56 using Vector6 = Eigen::Matrix<Scalar, 6, 1>;
57 template<
typename Scalar>
58 using VectorDyn = Eigen::Matrix<Scalar, Eigen::Dynamic , 1 >;
61 template<
typename Scalar>
62 using MatrixDynDyn = Eigen::Matrix<Scalar, Eigen::Dynamic , Eigen::Dynamic >;
63 template<
typename Scalar>
65 template<
typename Scalar>
66 using MatrixDynDynRow = Eigen::Matrix<Scalar, Eigen::Dynamic , Eigen::Dynamic, Eigen::RowMajor>;
68 template<
typename Scalar,
int M>
70 template<
typename Scalar,
int N>
72 template<
typename Scalar,
int M,
int N>
74 template<
typename Scalar,
int M>
78 template<
typename Scalar>
79 using AffineTrafo = Eigen::Transform<Scalar,3,Eigen::TransformTraits::Affine>;
80 template<
typename Scalar>
81 using AffineTrafo2d = Eigen::Transform<Scalar,2,Eigen::TransformTraits::Affine>;
83 template<
typename Scalar,
int M>
85 template<
typename Scalar,
int N>
87 template<
typename Scalar,
int M,
int N>
89 template<
typename Scalar,
int M>
92 template<
typename Scalar>
93 using Array3 = Eigen::Array<Scalar, 3, 1>;
94 template<
typename Scalar>
95 using Array2 = Eigen::Array<Scalar, 2, 1>;
101 template<
typename Derived>
using MatrixBase = Eigen::MatrixBase<Derived>;
102 template<
typename Derived>
using ArrayBase = Eigen::ArrayBase<Derived>;
104 template<
typename Derived>
using VectorBDyn = Eigen::VectorBlock<Derived,Eigen::Dynamic>;
105 template<
typename Derived,
int M>
using VectorBStat = Eigen::VectorBlock<Derived,M>;
108 template<
typename Derived,
int M>
using MatrixBStatDyn = Eigen::Block<Derived,M, Eigen::Dynamic>;
109 template<
typename Derived,
int N>
using MatrixBDynStat = Eigen::Block<Derived,Eigen::Dynamic,N>;
111 template<
typename EigenType>
using MatrixRef = Eigen::Ref<EigenType>;
113 template<
typename EigenType>
using MatrixMap = Eigen::Map<EigenType>;
127 #define ApproxMVBB_DEFINE_MATRIX_SPECIALTYPES \ 128 template<typename Derived> using MatrixBase = ApproxMVBB::MyMatrix::MatrixBase<Derived>; \ 129 template<typename Derived> using ArrayBase = ApproxMVBB::MyMatrix::ArrayBase<Derived>; \ 131 template<typename Derived> using VectorBDyn = ApproxMVBB::MyMatrix::VectorBDyn<Derived>; \ 132 template<typename Derived, int M> using VectorBStat = ApproxMVBB::MyMatrix::VectorBStat<Derived,M>; \ 134 template<typename Derived> using MatrixBDynDyn = ApproxMVBB::MyMatrix::MatrixBDynDyn<Derived>; \ 135 template<typename Derived, int N> using MatrixBDynStat = ApproxMVBB::MyMatrix::MatrixBDynStat<Derived,N>; \ 136 template<typename Derived, int M> using MatrixBStatDyn = ApproxMVBB::MyMatrix::MatrixBStatDyn<Derived,M>; \ 138 template<typename EigenType> using MatrixRef = ApproxMVBB::MyMatrix::MatrixRef< EigenType >; \ 139 template<typename EigenType> using MatrixMap = ApproxMVBB::MyMatrix::MatrixMap< EigenType >; \ 144 #define ApproxMVBB_DEFINE_MATRIX_TYPES_OF( _PREC_ ) \ 145 using Matrix44 = ApproxMVBB::MyMatrix::Matrix44< _PREC_ >; \ 146 using Matrix33 = ApproxMVBB::MyMatrix::Matrix33< _PREC_ >; \ 147 using Matrix22 = ApproxMVBB::MyMatrix::Matrix22< _PREC_ >; \ 148 using Matrix32 = ApproxMVBB::MyMatrix::Matrix32< _PREC_ >; \ 149 using Matrix23 = ApproxMVBB::MyMatrix::Matrix23< _PREC_ >; \ 150 using Matrix43 = ApproxMVBB::MyMatrix::Matrix43< _PREC_ >; \ 151 using Matrix34 = ApproxMVBB::MyMatrix::Matrix34< _PREC_ >; \ 152 using Vector3 = ApproxMVBB::MyMatrix::Vector3< _PREC_ >; \ 153 using Vector2 = ApproxMVBB::MyMatrix::Vector2< _PREC_ >; \ 154 using Vector4 = ApproxMVBB::MyMatrix::Vector4< _PREC_ >; \ 155 using Vector6 = ApproxMVBB::MyMatrix::Vector6< _PREC_ >; \ 156 using Quaternion = ApproxMVBB::MyMatrix::Quaternion< _PREC_ >; \ 157 using AngleAxis = ApproxMVBB::MyMatrix::AngleAxis< _PREC_ >; \ 158 using VectorDyn = ApproxMVBB::MyMatrix::VectorDyn< _PREC_ >; \ 159 using MatrixDynDyn = ApproxMVBB::MyMatrix::MatrixDynDyn< _PREC_ >; \ 160 using MatrixDiagDyn = ApproxMVBB::MyMatrix::MatrixDiagDyn< _PREC_ >; \ 161 using MatrixDynDynRow = ApproxMVBB::MyMatrix::MatrixDynDynRow< _PREC_ >; \ 163 template<int M> using MatrixStatDyn = ApproxMVBB::MyMatrix::MatrixStatDyn< _PREC_, M>; \ 164 template<int N> using MatrixDynStat = ApproxMVBB::MyMatrix::MatrixDynStat< _PREC_, N>; \ 165 template<int M, int N> using MatrixStatStat = ApproxMVBB::MyMatrix::MatrixStatStat< _PREC_, M,N>; \ 166 template<int M> using VectorStat = ApproxMVBB::MyMatrix::VectorStat< _PREC_, M>; \ 168 using AffineTrafo = ApproxMVBB::MyMatrix::AffineTrafo< _PREC_ >; \ 169 using AffineTrafo2d = ApproxMVBB::MyMatrix::AffineTrafo2d< _PREC_ >; \ 171 template<int M> using ArrayStatDyn = ApproxMVBB::MyMatrix::ArrayStatDyn< _PREC_, M>; \ 172 template<int N> using ArrayDynStat = ApproxMVBB::MyMatrix::ArrayDynStat< _PREC_, N>; \ 173 template<int M,int N> using ArrayStatStat = ApproxMVBB::MyMatrix::ArrayStatStat< _PREC_, M,N>; \ 174 template<int M> using ArrayStat = ApproxMVBB::MyMatrix::ArrayStat< _PREC_, M>; \ 175 using Array3 = ApproxMVBB::MyMatrix::Array3< _PREC_ >; \ 176 using Array2 = ApproxMVBB::MyMatrix::Array2< _PREC_ >; \ 178 ApproxMVBB_DEFINE_MATRIX_SPECIALTYPES Eigen::Matrix< Scalar, Eigen::Dynamic, N > MatrixDynStat
Eigen::Array< Scalar, 2, 1 > Array2
Eigen::Quaternion< Scalar > Quaternion
Eigen::Matrix< Scalar, 4, 1 > Vector4
Eigen::Matrix< Scalar, M, 1 > VectorStat
These are some container definitions.
Eigen::Matrix< Scalar, 2, 2 > Matrix22
Eigen::Matrix< Scalar, 2, 3 > Matrix23
Eigen::Matrix< Scalar, 4, 4 > Matrix44
Eigen::Array< Scalar, M, 1 > ArrayStat
Eigen::Matrix< Scalar, 4, 3 > Matrix43
Eigen::Array< Scalar, Eigen::Dynamic, N > ArrayDynStat
Eigen::Matrix< Scalar, 3, 2 > Matrix32
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > MatrixDynDyn
Eigen::VectorBlock< Derived, M > VectorBStat
Eigen::VectorBlock< Derived, Eigen::Dynamic > VectorBDyn
Eigen::DiagonalMatrix< Scalar, Eigen::Dynamic > MatrixDiagDyn
Eigen::AngleAxis< Scalar > AngleAxis
Eigen::Array< Scalar, M, Eigen::Dynamic > ArrayStatDyn
Eigen::Block< Derived > MatrixBDynDyn
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > MatrixDynDynRow
Eigen::Block< Derived, M, Eigen::Dynamic > MatrixBStatDyn
Eigen::Matrix< Scalar, 3, 3 > Matrix33
Eigen::Matrix< Scalar, M, N > MatrixStatStat
Eigen::MatrixBase< Derived > MatrixBase
Eigen::Array< Scalar, 3, 1 > Array3
Eigen::Array< Scalar, M, N > ArrayStatStat
Eigen::Ref< EigenType > MatrixRef
Eigen::Block< Derived, Eigen::Dynamic, N > MatrixBDynStat
Eigen::Matrix< Scalar, 2, 1 > Vector2
Eigen::Matrix< Scalar, 6, 1 > Vector6
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorDyn
Eigen::Map< EigenType > MatrixMap
Eigen::Matrix< Scalar, 3, 1 > Vector3
Eigen::Transform< Scalar, 2, Eigen::TransformTraits::Affine > AffineTrafo2d
Eigen::Matrix< Scalar, M, Eigen::Dynamic > MatrixStatDyn
Eigen::Matrix< Scalar, 3, 4 > Matrix34
Eigen::Transform< Scalar, 3, Eigen::TransformTraits::Affine > AffineTrafo
Eigen::ArrayBase< Derived > ArrayBase