MRPT  1.9.9
mat2eig.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <mrpt/core/is_defined.h>
12 #include <mrpt/math/math_frwds.h>
13 
14 namespace mrpt::math
15 {
16 /** Returns an Eigen-compatible type, despite its argument already is an Eigen
17  * matrix, or an mrpt-math matrix/vector. \ingroup mrpt_math_grp
18  */
19 template <class Derived>
20 const Derived& mat2eig(const Eigen::EigenBase<Derived>& m)
21 {
22  return m.derived();
23 }
24 
25 template <class MAT>
26 auto mat2eig(const MAT& m, typename MAT::eigen_t* = nullptr)
27 {
28  return m.asEigen();
29 }
30 
31 } // namespace mrpt::math
const Derived & mat2eig(const Eigen::EigenBase< Derived > &m)
Returns an Eigen-compatible type, despite its argument already is an Eigen matrix, or an mrpt-math matrix/vector.
Definition: mat2eig.h:20
This base provides a set of functions for maths stuff.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019