pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
eigen-fix.hpp
1//
2// Copyright (c) 2017-2018 CNRS
3//
4
5#ifndef __pinocchio_utils_eigen_fix_hpp__
6#define __pinocchio_utils_eigen_fix_hpp__
7
8#if EIGEN_VERSION_AT_LEAST(3, 2, 90) && !EIGEN_VERSION_AT_LEAST(3, 3, 0)
9namespace pinocchio
10{
11 namespace internal
12 {
15 template<typename XprType>
16 struct size_of_xpr_at_compile_time
17 {
18 enum
19 {
20 ret = Eigen::internal::size_at_compile_time
21 < Eigen::internal::traits<XprType>::RowsAtCompileTime,
22 Eigen::internal::traits<XprType>::ColsAtCompileTime > ::ret
23 };
24 };
25 } // namespace internal
26} // namespace pinocchio
27#endif
28
29namespace pinocchio
30{
31 namespace fix
32 {
33 namespace Eigen
34 {
35 namespace internal
36 {
37
38 /* plain_matrix_type_row_major : same as plain_matrix_type but guaranteed to be row-major
39 */
40 template<typename T>
41 struct plain_matrix_type_row_major
42 {
43 enum
44 {
45 Rows = ::Eigen::internal::traits<T>::RowsAtCompileTime,
46 Cols = ::Eigen::internal::traits<T>::ColsAtCompileTime,
47 MaxRows = ::Eigen::internal::traits<T>::MaxRowsAtCompileTime,
48 MaxCols = ::Eigen::internal::traits<T>::MaxColsAtCompileTime
49 };
50 typedef ::Eigen::Matrix<
51 typename ::Eigen::internal::traits<T>::Scalar,
52 Rows,
53 Cols,
54 (MaxCols == 1 && MaxRows != 1) ? ::Eigen::ColMajor : ::Eigen::RowMajor,
55 MaxRows,
56 MaxCols>
57 type;
58 };
59
60 } // namespace internal
61 } // namespace Eigen
62 } // namespace fix
63} // namespace pinocchio
64
65#endif // ifndef __pinocchio_utils_eigen_fix_hpp__
Main pinocchio namespace.
Definition treeview.dox:11