MyMatrixTypeDefs.hpp
Go to the documentation of this file.
1 // ========================================================================================
2 // ApproxMVBB
3 // Copyright (C) 2014 by Gabriel Nützi <nuetzig (at) imes (d0t) mavt (d0t) ethz (døt) ch>
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 // ========================================================================================
9 
10 #ifndef ApproxMVBB_Common_MyMatrixTypeDefs_hpp
11 #define ApproxMVBB_Common_MyMatrixTypeDefs_hpp
12 
14 
15 //#define EIGEN_DONT_VECTORIZE
16 //#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT
17 
18 #include <Eigen/Dense>
19 
20 namespace ApproxMVBB{
21 
22 // ================================================================================================
27 namespace MyMatrix {
28 
29  template<typename Scalar>
30  using Matrix44 = Eigen::Matrix<Scalar, 4, 4>;
31  template<typename Scalar>
32  using Matrix43 = Eigen::Matrix<Scalar, 4, 3>;
33  template<typename Scalar>
34  using Matrix34 = Eigen::Matrix<Scalar, 3, 4>;
35  template<typename Scalar>
36  using Matrix33 = Eigen::Matrix<Scalar, 3, 3>;
37  template<typename Scalar>
38  using Matrix32 = Eigen::Matrix<Scalar, 3, 2>;
39  template<typename Scalar>
40  using Matrix23 = Eigen::Matrix<Scalar, 2, 3>;
41  template<typename Scalar>
42  using Matrix22 = Eigen::Matrix<Scalar, 2, 2>;
43  template<typename Scalar>
44  using Vector3 = Eigen::Matrix<Scalar, 3, 1>;
45  template<typename Scalar>
46  using Vector2 = Eigen::Matrix<Scalar, 2, 1>;
47 
48  template<typename Scalar>
49  using Quaternion = Eigen::Quaternion<Scalar>;
50  template<typename Scalar>
51  using AngleAxis = Eigen::AngleAxis<Scalar>;
52 
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 >;
59 
60 
61  template<typename Scalar>
62  using MatrixDynDyn = Eigen::Matrix<Scalar, Eigen::Dynamic , Eigen::Dynamic >;
63  template<typename Scalar>
64  using MatrixDiagDyn = Eigen::DiagonalMatrix<Scalar, Eigen::Dynamic >;
65  template<typename Scalar>
66  using MatrixDynDynRow = Eigen::Matrix<Scalar, Eigen::Dynamic , Eigen::Dynamic, Eigen::RowMajor>;
67 
68  template<typename Scalar, int M>
69  using MatrixStatDyn = Eigen::Matrix<Scalar, M, Eigen::Dynamic >;
70  template<typename Scalar, int N>
71  using MatrixDynStat = Eigen::Matrix<Scalar, Eigen::Dynamic, N >;
72  template<typename Scalar, int M, int N>
73  using MatrixStatStat = Eigen::Matrix<Scalar, M, N >;
74  template<typename Scalar, int M>
75  using VectorStat = Eigen::Matrix<Scalar, M, 1 >;
76 
77 
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>;
82 
83  template<typename Scalar, int M>
84  using ArrayStatDyn = Eigen::Array<Scalar, M, Eigen::Dynamic >;
85  template<typename Scalar, int N>
86  using ArrayDynStat = Eigen::Array<Scalar, Eigen::Dynamic, N >;
87  template<typename Scalar, int M, int N>
88  using ArrayStatStat = Eigen::Array<Scalar, M, N >;
89  template<typename Scalar, int M>
90  using ArrayStat = Eigen::Array<Scalar, M,1>;
91 
92  template<typename Scalar>
93  using Array3 = Eigen::Array<Scalar, 3, 1>;
94  template<typename Scalar>
95  using Array2 = Eigen::Array<Scalar, 2, 1>;
96 
97 }
98 
99 namespace MyMatrix{
100 
101  template<typename Derived> using MatrixBase = Eigen::MatrixBase<Derived>;
102  template<typename Derived> using ArrayBase = Eigen::ArrayBase<Derived>;
103 
104  template<typename Derived> using VectorBDyn = Eigen::VectorBlock<Derived,Eigen::Dynamic>;
105  template<typename Derived, int M> using VectorBStat = Eigen::VectorBlock<Derived,M>;
106 
107  template<typename Derived> using MatrixBDynDyn = Eigen::Block<Derived>;
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>;
110 
111  template<typename EigenType> using MatrixRef = Eigen::Ref<EigenType>;
112 
113  template<typename EigenType> using MatrixMap = Eigen::Map<EigenType>;
114 
115 }
116 
117 
119  static const Eigen::IOFormat Matlab;
120  static const Eigen::IOFormat CommaSep;
121  static const Eigen::IOFormat SpaceSep;
122 };
123 
124 }
125 
126 
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>; \
130  \
131  template<typename Derived> using VectorBDyn = ApproxMVBB::MyMatrix::VectorBDyn<Derived>; \
132  template<typename Derived, int M> using VectorBStat = ApproxMVBB::MyMatrix::VectorBStat<Derived,M>; \
133  \
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>; \
137  \
138  template<typename EigenType> using MatrixRef = ApproxMVBB::MyMatrix::MatrixRef< EigenType >; \
139  template<typename EigenType> using MatrixMap = ApproxMVBB::MyMatrix::MatrixMap< EigenType >; \
140 
141 
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_ >; \
162  \
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>; \
167  \
168  using AffineTrafo = ApproxMVBB::MyMatrix::AffineTrafo< _PREC_ >; \
169  using AffineTrafo2d = ApproxMVBB::MyMatrix::AffineTrafo2d< _PREC_ >; \
170  \
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_ >; \
177  \
178  ApproxMVBB_DEFINE_MATRIX_SPECIALTYPES
179 
180 #endif
181 
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
#define APPROXMVBB_EXPORT
Definition: Platform.hpp:60
Eigen::Array< Scalar, Eigen::Dynamic, N > ArrayDynStat
static const Eigen::IOFormat Matlab
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
static const Eigen::IOFormat SpaceSep
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
static const Eigen::IOFormat CommaSep
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


asr_approx_mvbb
Author(s): Gassner Nikolai
autogenerated on Mon Jun 10 2019 12:38:08