Medusa  1.1
Coordinate Free Mehless Method implementation
traits_eigen.hpp
Go to the documentation of this file.
1 #ifndef MEDUSA_BITS_TYPES_TRAITS_EIGEN_HPP_
2 #define MEDUSA_BITS_TYPES_TRAITS_EIGEN_HPP_
3 
9 #include <medusa/Config.hpp>
10 #include "traits.hpp"
11 #include <Eigen/Core>
12 
13 namespace mm {
14 
16 template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
17 struct scalar_type<Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>> {
18  typedef _Scalar type;
19 };
20 
22 template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
23 struct vector_type<Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>> {
24  typedef Eigen::Matrix<_Scalar, _Cols, 1> type;
25 };
26 
27 } // namespace mm
28 
29 #endif // MEDUSA_BITS_TYPES_TRAITS_EIGEN_HPP_
mm
Root namespace for the whole library.
Definition: Gaussian.hpp:14
Config.hpp
mm::vector_type
Type trait for vector fields to obtain their underlying vector type.
Definition: traits.hpp:28
mm::scalar_type< Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::type
_Scalar type
Underlying scalar type.
Definition: traits_eigen.hpp:18
Matrix
Matrix(const Scalar &s)
Construct matrix from scalar. Enabled only for fixed size matrices.
Definition: MatrixAddons.hpp:21
traits.hpp
mm::scalar_type
Type trait for scalar fields to obtain their underlying scalar type.
Definition: traits.hpp:17
mm::vector_type< Eigen::Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::type
Eigen::Matrix< _Scalar, _Cols, 1 > type
Underlying vector type.
Definition: traits_eigen.hpp:24