18 using Scalar =
typename Base::Scalar;
19 static constexpr int Options = Base::Options;
25 template <
typename... BaseCtorArgs>
30 inline int nx()
const {
return base_.nx() + base_.ndx(); }
31 inline int ndx()
const {
return 2 * base_.ndx(); }
34 VectorXs
rand()
const;
37 return base_.isNormalized(p);
40 const Base &getBaseSpace()
const {
return base_; }
44 void integrate_impl(
const ConstVectorRef &x,
const ConstVectorRef &dx,
47 void difference_impl(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
50 void Jintegrate_impl(
const ConstVectorRef &x,
const ConstVectorRef &v,
51 MatrixRef Jout,
int arg)
const;
54 MatrixRef Jout,
int arg)
const;
56 void Jdifference_impl(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
57 MatrixRef Jout,
int arg)
const;
60 const Scalar &u, VectorRef out)
const;
64 template <
typename Po
int>
65 typename Point::ConstSegmentReturnType
getBasePoint(
const Point &x)
const {
66 return x.head(base_.nx());
69 template <
typename Po
int>
70 typename Point::SegmentReturnType getBasePointWrite(
const Point &x)
const {
71 return PROXSUITE_NLP_EIGEN_CONST_CAST(Point, x).head(base_.nx());
74 template <
typename Tangent>
75 typename Tangent::ConstSegmentReturnType
76 getBaseTangent(
const Tangent &v)
const {
77 return v.head(base_.ndx());
80 template <
typename Tangent>
81 typename Tangent::SegmentReturnType
82 getTangentHeadWrite(
const Tangent &v)
const {
83 return PROXSUITE_NLP_EIGEN_CONST_CAST(Tangent, v).head(base_.ndx());
86 template <
typename Jac>
87 Eigen::Block<Jac, Eigen::Dynamic, Eigen::Dynamic>
88 getBaseJacobian(
const Jac &J)
const {
89 return PROXSUITE_NLP_EIGEN_CONST_CAST(Jac, J).topLeftCorner(base_.ndx(),
97#include "proxsuite-nlp/modelling/spaces/tangent-bundle.hxx"
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
VectorXs rand() const
Sample a random point on the manifold.
TangentBundleTpl(Base base)
Constructor using base space instance.
Point::ConstSegmentReturnType getBasePoint(const Point &x) const
void difference_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, VectorRef out) const
Implementation of the manifold retraction operation.
void interpolate_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u, VectorRef out) const
Interpolation operation.
bool isNormalized(const ConstVectorRef &x) const
Check if the input vector x is a viable element of the manifold.
TangentBundleTpl(BaseCtorArgs... args)
Constructor using base space constructor.
void integrate_impl(const ConstVectorRef &x, const ConstVectorRef &dx, VectorRef out) const
Operators.
void JintegrateTransport(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
Perform the parallel transport operation.
VectorXs neutral() const
Get the neutral element from the manifold (if this makes sense).
int ndx() const
Get manifold tangent space dimension.
int nx() const
Declare implementations.