proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
proxsuite::nlp::ProblemTpl< _Scalar > Struct Template Reference

#include <proxsuite-nlp/problem-base.hpp>

Collaboration diagram for proxsuite::nlp::ProblemTpl< _Scalar >:
[legend]

Public Types

using Scalar = _Scalar
 
using ConstraintObject = ConstraintObjectTpl<Scalar>
 Generic constraint type.
 
using CostType = CostFunctionBaseTpl<Scalar>
 Cost function type.
 
using Manifold = ManifoldAbstractTpl<Scalar>
 
using Workspace = WorkspaceTpl<Scalar>
 

Public Member Functions

const CostTypecost () const
 
const Manifoldmanifold () const
 
template<class U >
 ProblemTpl (U &&manifold, shared_ptr< CostType > cost, const std::vector< ConstraintObject > &constraints={})
 
const ConstraintObjectgetConstraint (const std::size_t &i) const
 Get a pointer to the \(i\)-th constraint pointer.
 
std::size_t getNumConstraints () const
 Get the number of constraint blocks.
 
int getTotalConstraintDim () const
 
int getConstraintDim (std::size_t i) const
 Get dimension of constraint i.
 
int nx () const
 
int ndx () const
 
template<typename T >
void addConstraint (T &&cstr)
 Add a constraint to the problem, after initialization.
 
auto getSegment (VectorXs &x, std::size_t i) const
 
auto getConstSegment (const VectorXs &x, std::size_t i) const
 
std::vector< int > getIndices () const
 
int getIndex (std::size_t i) const
 
void evaluate (const ConstVectorRef &x, Workspace &workspace) const
 
void computeDerivatives (const ConstVectorRef &x, Workspace &workspace) const
 
void computeHessians (const ConstVectorRef &x, Workspace &workspace, bool evaluate_all_constraint_hessians=false) const
 

Public Attributes

 Scalar
 
polymorphic< Manifoldmanifold_
 The working manifold \(M\).
 
shared_ptr< CostTypecost_
 The cost function.
 
std::vector< ConstraintObjectconstraints_
 The set of constraints.
 

Protected Member Functions

void reset_constraint_dim_vars ()
 Set values of const data members for constraint dimensions.
 

Protected Attributes

int nc_total_
 Total number of constraints.
 
std::vector< int > ncs_
 
std::vector< int > indices_
 

Detailed Description

template<typename _Scalar>
struct proxsuite::nlp::ProblemTpl< _Scalar >

Definition at line 12 of file problem-base.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar >
using proxsuite::nlp::ProblemTpl< _Scalar >::Scalar = _Scalar

Definition at line 14 of file problem-base.hpp.

◆ ConstraintObject

template<typename _Scalar >
using proxsuite::nlp::ProblemTpl< _Scalar >::ConstraintObject = ConstraintObjectTpl<Scalar>

Generic constraint type.

Definition at line 18 of file problem-base.hpp.

◆ CostType

template<typename _Scalar >
using proxsuite::nlp::ProblemTpl< _Scalar >::CostType = CostFunctionBaseTpl<Scalar>

Cost function type.

Definition at line 20 of file problem-base.hpp.

◆ Manifold

template<typename _Scalar >
using proxsuite::nlp::ProblemTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar>

Definition at line 21 of file problem-base.hpp.

◆ Workspace

template<typename _Scalar >
using proxsuite::nlp::ProblemTpl< _Scalar >::Workspace = WorkspaceTpl<Scalar>

Definition at line 22 of file problem-base.hpp.

Constructor & Destructor Documentation

◆ ProblemTpl()

template<typename _Scalar >
template<class U >
proxsuite::nlp::ProblemTpl< _Scalar >::ProblemTpl ( U && manifold,
shared_ptr< CostType > cost,
const std::vector< ConstraintObject > & constraints = {} )
inline

Definition at line 35 of file problem-base.hpp.

Member Function Documentation

◆ cost()

template<typename _Scalar >
const CostType & proxsuite::nlp::ProblemTpl< _Scalar >::cost ( ) const
inline

Definition at line 31 of file problem-base.hpp.

◆ manifold()

template<typename _Scalar >
const Manifold & proxsuite::nlp::ProblemTpl< _Scalar >::manifold ( ) const
inline

Definition at line 32 of file problem-base.hpp.

◆ getConstraint()

template<typename _Scalar >
const ConstraintObject & proxsuite::nlp::ProblemTpl< _Scalar >::getConstraint ( const std::size_t & i) const
inline

Get a pointer to the \(i\)-th constraint pointer.

Definition at line 43 of file problem-base.hpp.

◆ getNumConstraints()

template<typename _Scalar >
std::size_t proxsuite::nlp::ProblemTpl< _Scalar >::getNumConstraints ( ) const
inline

Get the number of constraint blocks.

Definition at line 48 of file problem-base.hpp.

◆ getTotalConstraintDim()

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::getTotalConstraintDim ( ) const
inline

Definition at line 50 of file problem-base.hpp.

◆ getConstraintDim()

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::getConstraintDim ( std::size_t i) const
inline

Get dimension of constraint i.

Definition at line 53 of file problem-base.hpp.

◆ nx()

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::nx ( ) const
inline

Definition at line 55 of file problem-base.hpp.

◆ ndx()

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::ndx ( ) const
inline

Definition at line 56 of file problem-base.hpp.

◆ addConstraint()

template<typename _Scalar >
template<typename T >
void proxsuite::nlp::ProblemTpl< _Scalar >::addConstraint ( T && cstr)
inline

Add a constraint to the problem, after initialization.

Definition at line 59 of file problem-base.hpp.

◆ getSegment()

template<typename _Scalar >
auto proxsuite::nlp::ProblemTpl< _Scalar >::getSegment ( VectorXs & x,
std::size_t i ) const
inline

Definition at line 64 of file problem-base.hpp.

◆ getConstSegment()

template<typename _Scalar >
auto proxsuite::nlp::ProblemTpl< _Scalar >::getConstSegment ( const VectorXs & x,
std::size_t i ) const
inline

Definition at line 68 of file problem-base.hpp.

◆ getIndices()

template<typename _Scalar >
std::vector< int > proxsuite::nlp::ProblemTpl< _Scalar >::getIndices ( ) const
inline

Definition at line 72 of file problem-base.hpp.

◆ getIndex()

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::getIndex ( std::size_t i) const
inline

Definition at line 74 of file problem-base.hpp.

◆ evaluate()

template<typename _Scalar >
void proxsuite::nlp::ProblemTpl< _Scalar >::evaluate ( const ConstVectorRef & x,
Workspace & workspace ) const
inline

Definition at line 76 of file problem-base.hpp.

◆ computeDerivatives()

template<typename _Scalar >
void proxsuite::nlp::ProblemTpl< _Scalar >::computeDerivatives ( const ConstVectorRef & x,
Workspace & workspace ) const
inline

Definition at line 85 of file problem-base.hpp.

◆ computeHessians()

template<typename _Scalar >
void proxsuite::nlp::ProblemTpl< _Scalar >::computeHessians ( const ConstVectorRef & x,
Workspace & workspace,
bool evaluate_all_constraint_hessians = false ) const
inline

Definition at line 94 of file problem-base.hpp.

◆ reset_constraint_dim_vars()

template<typename _Scalar >
void proxsuite::nlp::ProblemTpl< _Scalar >::reset_constraint_dim_vars ( )
inlineprotected

Set values of const data members for constraint dimensions.

Definition at line 114 of file problem-base.hpp.

Member Data Documentation

◆ Scalar

template<typename _Scalar >
proxsuite::nlp::ProblemTpl< _Scalar >::Scalar

Definition at line 15 of file problem-base.hpp.

◆ manifold_

template<typename _Scalar >
polymorphic<Manifold> proxsuite::nlp::ProblemTpl< _Scalar >::manifold_

The working manifold \(M\).

Definition at line 25 of file problem-base.hpp.

◆ cost_

template<typename _Scalar >
shared_ptr<CostType> proxsuite::nlp::ProblemTpl< _Scalar >::cost_

The cost function.

Definition at line 27 of file problem-base.hpp.

◆ constraints_

template<typename _Scalar >
std::vector<ConstraintObject> proxsuite::nlp::ProblemTpl< _Scalar >::constraints_

The set of constraints.

Definition at line 29 of file problem-base.hpp.

◆ nc_total_

template<typename _Scalar >
int proxsuite::nlp::ProblemTpl< _Scalar >::nc_total_
protected

Total number of constraints.

Definition at line 109 of file problem-base.hpp.

◆ ncs_

template<typename _Scalar >
std::vector<int> proxsuite::nlp::ProblemTpl< _Scalar >::ncs_
protected

Definition at line 110 of file problem-base.hpp.

◆ indices_

template<typename _Scalar >
std::vector<int> proxsuite::nlp::ProblemTpl< _Scalar >::indices_
protected

Definition at line 111 of file problem-base.hpp.


The documentation for this struct was generated from the following files: