23 virtual int nx()
const = 0;
25 virtual int ndx()
const = 0;
29 virtual VectorXs
neutral()
const {
return VectorXs::Zero(
nx()); }
31 virtual VectorXs
rand()
const {
return VectorXs::Random(
nx()); }
34 virtual bool isNormalized(
const ConstVectorRef & )
const {
return true; }
47 void integrate(
const ConstVectorRef &x,
const ConstVectorRef &v,
51 void Jintegrate(
const ConstVectorRef &x,
const ConstVectorRef &v,
52 MatrixRef Jout,
int arg)
const;
57 const ConstVectorRef &v, MatrixRef Jout,
61 void difference(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
65 void Jdifference(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
66 MatrixRef Jout,
int arg)
const;
68 void interpolate(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
69 const Scalar &u, VectorRef out)
const;
77 VectorXs
integrate(
const ConstVectorRef &x,
const ConstVectorRef &v)
const {
87 const ConstVectorRef &x1)
const {
94 VectorXs
interpolate(
const ConstVectorRef &x0,
const ConstVectorRef &x1,
106 VectorRef out)
const = 0;
109 MatrixRef Jout,
int arg)
const = 0;
113 const ConstVectorRef &x1,
114 VectorRef out)
const = 0;
117 const ConstVectorRef &x1, MatrixRef Jout,
122 const ConstVectorRef &x1,
const Scalar &u,
123 VectorRef out)
const {
132#include "proxsuite-nlp/manifold-base.hxx"
134#ifdef PROXSUITE_NLP_ENABLE_TEMPLATE_INSTANTIATION
135#include "proxsuite-nlp/manifold-base.txx"
Forward declarations and configuration macros.
#define PROXSUITE_NLP_DYNAMIC_TYPEDEFS(Scalar)
static constexpr int Options
Scalar type.
virtual VectorXs neutral() const
Get the neutral element from the manifold (if this makes sense).
VectorSpaceTpl< Scalar, Eigen::Dynamic, Options > TangentSpaceType
Typedef for the tangent space, as a manifold.
virtual int nx() const =0
Get manifold representation dimension.
VectorXs difference(const ConstVectorRef &x0, const ConstVectorRef &x1) const
Manifold difference/retraction operation .
virtual void integrate_impl(const ConstVectorRef &x, const ConstVectorRef &v, VectorRef out) const =0
Perform the manifold integration operation.
virtual void Jintegrate_impl(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const =0
virtual int ndx() const =0
Get manifold tangent space dimension.
void integrate(const ConstVectorRef &x, const ConstVectorRef &v, VectorRef out) const
Manifold integration operation .
void difference(const ConstVectorRef &x0, const ConstVectorRef &x1, VectorRef out) const
Manifold difference/retraction operation .
virtual VectorXs rand() const
Sample a random point on the manifold.
const TangentSpaceType tangentSpace() const
Return an object representing the tangent space as a manifold.
void interpolate(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u, VectorRef out) const
VectorXs interpolate(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u) const
Interpolation operation.
virtual void JintegrateTransport(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const =0
Perform the parallel transport operation.
virtual void interpolate_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, const Scalar &u, VectorRef out) const
Interpolation operation.
virtual void difference_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, VectorRef out) const =0
Implementation of the manifold retraction operation.
void Jdifference(const ConstVectorRef &x0, const ConstVectorRef &x1, MatrixRef Jout, int arg) const
Jacobian of the retraction operation.
virtual ~ManifoldAbstractTpl()=default
void Jintegrate(const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Jout, int arg) const
Jacobian of the integation operation.
virtual void Jdifference_impl(const ConstVectorRef &x0, const ConstVectorRef &x1, MatrixRef Jout, int arg) const =0
virtual bool isNormalized(const ConstVectorRef &) const
Check if the input vector x is a viable element of the manifold.
VectorXs integrate(const ConstVectorRef &x, const ConstVectorRef &v) const
Manifold integration operation .
Standard Euclidean vector space.