pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
eigen.hpp
1//
2// Copyright (c) 2020-2025 INRIA
3//
4
5#pragma once
6
7#include <string>
8#include <sstream>
9
10#include "pinocchio/math.hpp"
11
12namespace pinocchio
13{
14 namespace python
15 {
16 template<typename MatrixLike>
17 std::string getEigenTypeName()
18 {
19 std::stringstream ss;
20 if (::pinocchio::helper::is_eigen_ref<MatrixLike>::value)
21 {
22 ss << "Ref";
23 }
24
25 if (MatrixLike::IsRowMajor)
26 ss << "Row";
27
28 if (MatrixLike::IsVectorAtCompileTime)
29 {
30 ss << "Vector";
31 }
32 else
33 {
34 ss << "Matrix";
35 }
36
37 if (MatrixLike::SizeAtCompileTime == Eigen::Dynamic)
38 {
39 ss << "X";
40 }
41 else
42 {
43 ss << std::to_string(MatrixLike::SizeAtCompileTime);
44 }
45
46 return ss.str();
47 }
48 } // namespace python
49} // namespace pinocchio
Main pinocchio namespace.
Definition treeview.dox:11