26 typename G::PlainObject;
27 {G::Dof}->std::convertible_to<
int>;
28 {G::IsCommutative}->std::convertible_to<
bool>;
30(!(G::Dof > 0) ||
requires {
31 {G::Identity()}->std::convertible_to<
typename G::PlainObject>;
32 {G::Random()}->std::convertible_to<
typename G::PlainObject>;
34(!(G::Dof == -1) ||
requires (Eigen::Index
dof) {
35 {G::Identity(
dof)}->std::convertible_to<
typename G::PlainObject>;
36 {G::Random(
dof)}->std::convertible_to<
typename G::PlainObject>;
38(G::Tangent::SizeAtCompileTime == G::Dof) &&
39requires(
const G & g1,
const G & g2,
typename G::Scalar eps) {
40 {g1.dof()}->std::convertible_to<Eigen::Index>;
41 {g1.Ad()}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof>>;
42 {g1 * g2}->std::convertible_to<
typename G::PlainObject>;
43 {g1.inverse()}->std::convertible_to<
typename G::PlainObject>;
44 {g1.isApprox(g2, eps)}->std::convertible_to<
bool>;
45 {g1.log()}->std::convertible_to<Eigen::Vector<typename G::Scalar, G::Dof>>;
47requires(
const Eigen::Vector<typename G::Scalar, G::Dof> & a) {
48 {G::ad(a)}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof>>;
49 {G::exp(a)}->std::convertible_to<
typename G::PlainObject>;
50 {G::dr_exp(a)}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof>>;
51 {G::dr_expinv(a)}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof>>;
52 {G::d2r_exp(a)}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof * G::Dof>>;
53 {G::d2r_expinv(a)}->std::convertible_to<Eigen::Matrix<typename G::Scalar, G::Dof, G::Dof * G::Dof>>;
60template<NativeLieGroup G>
64 using Scalar =
typename G::Scalar;
65 template<
typename NewScalar>
69 static constexpr int Dof = G::Dof;
70 static constexpr bool IsCommutative = G::IsCommutative;
76 if constexpr (G::Dof == -1) {
77 return G::Identity(
dof);
84 if constexpr (G::Dof == -1) {
85 return G::Random(
dof);
90 static inline typename G::TangentMap
Ad(
const G & g) {
return g.Ad(); }
91 template<NativeLieGroup Go>
94 return g1.operator*(g2);
96 static inline Eigen::Index
dof(
const G &) {
return G::Dof; }
98 template<NativeLieGroup Go>
99 static inline bool isApprox(
const G & g,
const Go & go,
Scalar eps)
101 return g.isApprox(go, eps);
103 static inline typename G::Tangent
log(
const G & g) {
return g.log(); }
104 template<
typename NewScalar>
107 return g.template cast<NewScalar>();
112 template<
typename Derived>
113 static inline typename G::TangentMap
ad(
const Eigen::MatrixBase<Derived> & a)
117 template<
typename Derived>
118 static inline PlainObject exp(
const Eigen::MatrixBase<Derived> & a)
122 template<
typename Derived>
123 static inline typename G::TangentMap
dr_exp(
const Eigen::MatrixBase<Derived> & a)
127 template<
typename Derived>
128 static inline typename G::TangentMap
dr_expinv(
const Eigen::MatrixBase<Derived> & a)
130 return G::dr_expinv(a);
132 template<
typename Derived>
133 static inline typename G::Hessian
d2r_exp(
const Eigen::MatrixBase<Derived> & a)
135 return G::d2r_exp(a);
137 template<
typename Derived>
138 static inline typename G::Hessian
d2r_expinv(
const Eigen::MatrixBase<Derived> & a)
140 return G::d2r_expinv(a);
Concept defining class with an internal Lie group interface.
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.
Trait class for making a class a LieGroup instance via specialization.