10 #ifndef EIGEN_LGSM_LIE_ALGEBRA_H 11 #define EIGEN_LGSM_LIE_ALGEBRA_H 30 template<
class A,
class Derived>
34 template<
class A,
class Derived>
class LieAlgebraBase :
public MatrixBase<Derived> {
37 typedef MatrixBase<Derived>
Base;
59 template<class OtherDerived> inline PlainObject bracket(const
LieAlgebraBase<BaseType, OtherDerived>& a) const;
61 template<class OtherDerived> inline const PlainObject adjoint(const
LieAlgebraBase<BaseType, OtherDerived>& a) const;
65 Group exp(Scalar precision = 1.e-6) const;
68 inline const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
70 inline Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
95 template<
class A,
class Derived>
102 typedef MatrixBase<Derived>
Base;
114 this->
get() = other.
get();
119 this->
get() = other.
get();
132 typedef typename internal::traits<Derived>::Group
Group;
135 inline const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
137 inline Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
140 inline Coefficients&
get() {
return this->derived().get(); }
142 inline const Coefficients&
get()
const {
return this->derived().get(); }
152 struct traits<
LieAlgebra<A> > :
public traits<LieAlgebraBase<A, LieAlgebra<A> > >
176 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(
LieAlgebra)
185 inline Coefficients& get() {
return m_coeffs; }
200 struct traits<
LieAlgebraDual<A> > :
public traits<LieAlgebraDualBase<A, LieAlgebraDual<A> > >
233 inline Coefficients& get() {
return m_coeffs; }
247 template<
class A,
int MapOptions,
typename Str
ideType>
248 struct traits<Map<
LieAlgebra<A>, MapOptions, StrideType> > :
public traits<LieAlgebraBase<A, Map<LieAlgebra<A>, MapOptions, StrideType> > >
255 template<
class A,
int MapOptions,
typename Str
ideType>
256 struct traits<Map<const
LieAlgebra<A>, MapOptions, StrideType> > :
public traits<LieAlgebraBase<A, Map<const LieAlgebra<A>, MapOptions, StrideType> > >
276 template<
class A,
int MapOptions,
typename Str
ideType>
283 EIGEN_DENSE_PUBLIC_INTERFACE(Map)
285 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
291 Map(const A& a) : m_coeffs(a.data()) {};
293 Map(Scalar* data) : m_coeffs(data) {};
295 Map(
const Map& m) : m_coeffs(m.get()) {};
307 template<
class A,
int MapOptions,
typename Str
ideType>
308 class Map<const
LieAlgebra<A>, MapOptions, StrideType> :
public LieAlgebraBase<A, Map<const LieAlgebra<A>, MapOptions, StrideType> > {
314 EIGEN_DENSE_PUBLIC_INTERFACE(Map)
320 Map(const A& a) : m_coeffs(a.data()) {};
322 Map(
const Scalar* data) : m_coeffs(data) {};
324 Map(
const Map& m) : m_coeffs(m.get()) {};
342 template<
class A,
int MapOptions,
typename Str
ideType>
343 struct traits<Map<
LieAlgebraDual<A>, MapOptions, StrideType> > :
public traits<LieAlgebraDualBase<A, Map<LieAlgebraDual<A>, MapOptions, StrideType> > >
348 template<
class A,
int MapOptions,
typename Str
ideType>
349 struct traits<Map<const
LieAlgebraDual<A>, MapOptions, StrideType> > :
public traits<LieAlgebraDualBase<A, Map<const LieAlgebraDual<A>, MapOptions, StrideType> > >
369 template<
class A,
int MapOptions,
typename Str
ideType>
376 EIGEN_DENSE_PUBLIC_INTERFACE(Map)
378 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Map)
384 Map(const A& a) : m_coeffs(a) {};
386 Map(Scalar* data) : m_coeffs(data) {};
388 Map(
const Map& m) : m_coeffs(m.get()) {};
400 template<
class A,
int MapOptions,
typename Str
ideType>
407 EIGEN_DENSE_PUBLIC_INTERFACE(Map)
413 Map(const A& a) : m_coeffs(a) {};
415 Map(
const Scalar* data) : m_coeffs(data) {};
417 Map(
const Map& m) : m_coeffs(m.get()) {};
LieAlgebraBase< A, LieAlgebra< A > > Base
internal::traits< Map< LieAlgebra< A >, MapOptions, StrideType > >::Coefficients Coefficients
LieAlgebraBase< A, Map< LieAlgebra< A >, MapOptions, StrideType > > Base
Class describing an element of a Lie Algebra.
Map< A, MapOptions, StrideType > Coefficients
LieAlgebraDualBase< A, LieAlgebraDual< A > > Base
LieAlgebraDualBase< A, Map< LieAlgebraDual< A >, MapOptions, StrideType > > Base
internal::traits< Derived >::Group Group
MatrixBase< Derived > Base
Map< A, MapOptions, StrideType > Coefficients
internal::traits< Derived >::Coefficients Coefficients
Map< Twist< _Scalar >, MapOptions, StrideType >::LieGroup Group
Map< A, MapOptions, StrideType > Coefficients
internal::traits< LieAlgebra< A > >::Coefficients Coefficients
Matrix< internal::traits< Map< Twist< _Scalar >, MapOptions, StrideType > >::Scalar, 6, 1 > BaseType
internal::traits< Map< const LieAlgebra< A >, MapOptions, StrideType > >::Coefficients Coefficients
EIGEN_STRONG_INLINE Derived & operator=(const LieAlgebraDualBase< BaseType, OtherDerived > &other)
const Derived & derived() const
Map< const A, MapOptions, StrideType > Coefficients
internal::traits< LieAlgebraDual< A > >::Coefficients Coefficients
LieAlgebraDualBase< A, Map< const LieAlgebraDual< A >, MapOptions, StrideType > > Base
LieAlgebraDual< BaseType > PlainObject
LieAlgebra< BaseType > Algebra
#define LIE_INHERIT_MATRIX_BASE(r, c)
internal::traits< Map< const LieAlgebraDual< A >, MapOptions, StrideType > >::Coefficients Coefficients
MatrixBase< Derived > Base
Base class for all Lie Algebra class.
internal::traits< Map< Twist< _Scalar >, MapOptions, StrideType > >::Coefficients Coefficients
internal::traits< Map< LieAlgebraDual< A >, MapOptions, StrideType > >::Coefficients Coefficients
LieAlgebraBase< A, Map< const LieAlgebra< A >, MapOptions, StrideType > > Base
Class describing an element of a Lie Group.
Class describing an element of a Lie algebra dual.