15 using Scalar =
typename Base::Scalar;
16 static constexpr int Options = Base::Options;
23 template <
typename... BaseCtorArgs>
25 :
base_(Base(args...)) {}
30 inline int ndx()
const {
return 2 *
base_.ndx(); }
34 return base_.isNormalized(p);
41 template <
typename Po
int>
42 typename Point::ConstSegmentReturnType
44 return x.head(
base_.nx());
47 template <
typename Po
int>
48 typename Point::SegmentReturnType
50 return x.const_cast_derived().head(
base_.nx());
53 template <
typename Tangent>
54 typename Tangent::ConstSegmentReturnType
56 return v.head(
base_.ndx());
59 template <
typename Tangent>
60 typename Tangent::SegmentReturnType
62 return v.const_cast_derived().head(
base_.ndx());
65 template <
typename Jac>
66 Eigen::Block<Jac, Eigen::Dynamic, Eigen::Dynamic>
68 return J.const_cast_derived().topLeftCorner(
base_.ndx(),
base_.ndx());
84 MatrixRef Jout,
int arg)
const;
87 const ConstVectorRef &v, MatrixRef Jout,
91 MatrixRef Jout,
int arg)
const;
94 const Scalar &u, VectorRef out)
const;
99#include "aligator/modelling/spaces/tangent-bundle.hxx"
Base class for manifolds, to use in cost funcs, solvers...
void Jdifference_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, MatrixRef Jout, int arg) const
Point::SegmentReturnType getBasePointWrite(const Eigen::MatrixBase< Point > &x) const
void interpolate_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u, VectorRef out) const
Interpolation operation.
typename Base::Scalar Scalar
TangentBundleTpl(BaseCtorArgs... args)
Constructor using base space constructor.
void rand_impl(VectorRef out) const
Tangent::SegmentReturnType getTangentHeadWrite(const Eigen::MatrixBase< Tangent > &v) const
void neutral_impl(VectorRef out) const
void integrate_impl(const ConstVectorRef &x, const ConstVectorRef &dx, VectorRef out) const
Perform the manifold integration operation.
int ndx() const
Get manifold tangent space dimension.
int nx() const
Declare implementations.
const Base & getBaseSpace() const
Point::ConstSegmentReturnType getBasePoint(const Eigen::MatrixBase< Point > &x) const
void JintegrateTransport_impl(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
bool isNormalized(const ConstVectorRef &x) const
Check if the input vector x is a viable element of the manifold.
void Jintegrate_impl(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
TangentBundleTpl(Base base)
Constructor using base space instance.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
Eigen::Block< Jac, Eigen::Dynamic, Eigen::Dynamic > getBaseJacobian(const Eigen::MatrixBase< Jac > &J) const
void difference_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, VectorRef out) const
Implementation of the manifold retraction operation.
static constexpr int Options
TangentBundleTpl< Base > Self
Tangent::ConstSegmentReturnType getBaseTangent(const Tangent &v) const