6#include "smooth/detail/traits.hpp"
23 static constexpr int Dof = G::SizeAtCompileTime;
24 static constexpr bool IsCommutative =
true;
26 using Scalar =
typename G::Scalar;
28 template<
typename NewScalar>
29 using CastT = Eigen::Vector<NewScalar, Dof>;
35 static inline Eigen::Matrix<Scalar, Dof, Dof>
Ad(
const G & g)
37 return Eigen::Matrix<Scalar, Dof, Dof>::Identity(g.size(), g.size());
39 template<
typename Derived>
44 static inline Eigen::Index
dof(
const G & g) {
return g.size(); }
46 template<
typename Derived>
47 static inline bool isApprox(
const G & g,
const Eigen::MatrixBase<Derived> & g2,
Scalar eps)
49 return g.isApprox(g2, eps);
51 static inline Eigen::Vector<Scalar, Dof>
log(
const G & g) {
return g; }
52 template<
typename NewScalar>
53 static inline Eigen::Vector<NewScalar, Dof>
cast(
const G & g)
55 return g.template cast<NewScalar>();
60 template<
typename Derived>
61 static inline Eigen::Matrix<Scalar, Dof, Dof>
ad(
const Eigen::MatrixBase<Derived> & a)
63 return Eigen::Matrix<Scalar, Dof, Dof>::Zero(a.size(), a.size());
65 template<
typename Derived>
66 static inline PlainObject exp(
const Eigen::MatrixBase<Derived> & a)
70 template<
typename Derived>
71 static inline Eigen::Matrix<Scalar, Dof, Dof>
dr_exp(
const Eigen::MatrixBase<Derived> & a)
73 return Eigen::Matrix<Scalar, Dof, Dof>::Identity(a.size(), a.size());
75 template<
typename Derived>
76 static inline Eigen::Matrix<Scalar, Dof, Dof>
dr_expinv(
const Eigen::MatrixBase<Derived> & a)
78 return Eigen::Matrix<Scalar, Dof, Dof>::Identity(a.size(), a.size());
80 template<
typename Derived>
81 static inline Eigen::Matrix<
Scalar, Dof, (Dof > 0 ? Dof * Dof : -1)>
d2r_exp(
const Eigen::MatrixBase<Derived> & a)
83 return Eigen::Matrix<
Scalar, Dof, (Dof > 0 ? Dof * Dof : -1)>::Zero(a.size(), a.size() * a.size());
85 template<
typename Derived>
86 static inline Eigen::Matrix<
Scalar, Dof, (Dof > 0 ? Dof * Dof : -1)>
d2r_expinv(
const Eigen::MatrixBase<Derived> & a)
88 return Eigen::Matrix<
Scalar, Dof, (Dof > 0 ? Dof * Dof : -1)>::Zero(a.size(), a.size() * a.size());
TangentMap< G > Ad(const G &g)
Group adjoint .
PlainObject< G > Random()
Random element in Lie group with static Dof.
Hessian< G > d2r_exp(Arg &&a)
Right Hessian of exponential map.
bool isApprox(const G &g, Arg &&a, typename traits::lie< G >::Scalar eps=Eigen::NumTraits< typename traits::lie< G >::Scalar >::dummy_precision())
Check if two group elements are approximately equal.
Tangent< G > log(const G &g)
Group logarithm.
TangentMap< G > dr_exp(Arg &&a)
Right Jacobian of exponential map.
PlainObject< G > composition(const G &g, Arg &&a)
Group binary composition.
PlainObject< G > exp(Arg &&a)
Lie algebra exponential.
Hessian< G > d2r_expinv(Arg &&a)
Right Hessian of exponential map inverse.
PlainObject< G > Identity()
Identity in Lie group with static Dof.
TangentMap< G > ad(Arg &&a)
Lie algebra adjoint .
PlainObject< G > inverse(const G &g)
Group inverse.
TangentMap< G > dr_expinv(Arg &&a)
Right Jacobian of exponential map inverse.
typename traits::man< M >::Scalar Scalar
Manifold scalar type.
Eigen::Index dof(const M &m)
Manifold degrees of freedom (tangent space dimension)
typename traits::man< M >::template CastT< NewScalar > CastT
Cast'ed type.
CastT< NewScalar, M > cast(const M &m)
Cast to different scalar type.
typename traits::man< M >::PlainObject PlainObject
Manifold default type.