12#include "../concepts/lie_group.hpp"
13#include "../detail/traits.hpp"
27 template<
typename NewScalar>
28 using CastT = NewScalar;
30 static constexpr int Dof = 1;
31 static constexpr bool IsCommutative =
true;
39 std::uniform_real_distribution<Scalar> dist(-1., 1.);
42 static inline Eigen::Matrix<Scalar, 1, 1>
Ad(G) {
return Eigen::Matrix<Scalar, 1, 1>{1}; }
44 static inline Eigen::Index
dof(G) {
return 1; }
49 return abs<G>(g1 - g2) <= eps * abs<G>(g1);
51 static inline Eigen::Matrix<Scalar, 1, 1>
log(G g) {
return Eigen::Matrix<Scalar, 1, 1>{g}; }
52 template<
typename NewScalar>
53 static inline NewScalar
cast(G g)
55 return static_cast<NewScalar
>(g);
60 template<
typename Derived>
61 static inline Eigen::Matrix<Scalar, 1, 1>
ad(
const Eigen::MatrixBase<Derived> &)
63 return Eigen::Matrix<Scalar, 1, 1>::Zero();
65 template<
typename Derived>
66 static inline PlainObject exp(
const Eigen::MatrixBase<Derived> & a)
70 template<
typename Derived>
71 static inline Eigen::Matrix<Scalar, 1, 1>
dr_exp(
const Eigen::MatrixBase<Derived> &)
73 return Eigen::Matrix<Scalar, 1, 1>::Identity();
75 template<
typename Derived>
76 static inline Eigen::Matrix<Scalar, 1, 1>
dr_expinv(
const Eigen::MatrixBase<Derived> &)
78 return Eigen::Matrix<Scalar, 1, 1>::Identity();
80 template<
typename Derived>
81 static inline Eigen::Matrix<Scalar, 1, 1>
d2r_exp(
const Eigen::MatrixBase<Derived> &)
83 return Eigen::Matrix<Scalar, 1, 1>::Zero();
85 template<
typename Derived>
86 static inline Eigen::Matrix<Scalar, 1, 1>
d2r_expinv(
const Eigen::MatrixBase<Derived> &)
88 return Eigen::Matrix<Scalar, 1, 1>::Zero();
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.