proxsuite-nlp
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
|
Base class for differentiable cost functions. More...
#include <proxsuite-nlp/cost-function.hpp>
Public Types | |
using | Scalar = _Scalar |
using | Base = C2FunctionTpl<Scalar> |
Public Types inherited from proxsuite::nlp::C2FunctionTpl< _Scalar > | |
using | Scalar |
using | Base |
Public Types inherited from proxsuite::nlp::C1FunctionTpl< _Scalar > | |
using | Scalar |
using | Base |
Public Types inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
using | Scalar |
Public Types inherited from proxsuite::nlp::math_types< _Scalar > | |
using | Scalar = _Scalar |
Public Member Functions | |
CostFunctionBaseTpl (const int nx, const int ndx) | |
CostFunctionBaseTpl (const ManifoldAbstractTpl< Scalar > &manifold) | |
virtual Scalar | call (const ConstVectorRef &x) const =0 |
Evaluate the cost function. | |
virtual void | computeGradient (const ConstVectorRef &x, VectorRef out) const =0 |
virtual void | computeHessian (const ConstVectorRef &x, MatrixRef out) const =0 |
VectorXs | computeGradient (const ConstVectorRef &x) const |
MatrixXs | computeHessian (const ConstVectorRef &x) const |
VectorXs | operator() (const ConstVectorRef &x) const |
Evaluate the residual at a given point x. | |
void | computeJacobian (const ConstVectorRef &x, MatrixRef Jout) const |
Jacobian matrix of the constraint function. | |
void | vectorHessianProduct (const ConstVectorRef &x, const ConstVectorRef &v, MatrixRef Hout) const |
Vector-hessian product. | |
virtual | ~CostFunctionBaseTpl ()=default |
Public Member Functions inherited from proxsuite::nlp::C2FunctionTpl< _Scalar > | |
C2FunctionTpl (const int nx, const int ndx, const int nr) | |
C2FunctionTpl (const ManifoldAbstractTpl< _Scalar > &manifold, const int nr) | |
Public Member Functions inherited from proxsuite::nlp::C1FunctionTpl< _Scalar > | |
C1FunctionTpl (const int nx, const int ndx, const int nr) | |
C1FunctionTpl (const ManifoldAbstractTpl< _Scalar > &manifold, const int nr) | |
MatrixXs | computeJacobian (const ConstVectorRef &x) const |
Jacobian matrix of the constraint function. | |
Public Member Functions inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
BaseFunctionTpl (const int nx, const int ndx, const int nr) | |
BaseFunctionTpl (const ManifoldAbstractTpl< _Scalar > &manifold, const int nr) | |
virtual | ~BaseFunctionTpl ()=default |
int | nx () const |
Get function input vector size (representation of manifold). | |
int | ndx () const |
Get input manifold's tangent space dimension. | |
int | nr () const |
Get function codimension. | |
Public Attributes | |
Scalar | |
Public Attributes inherited from proxsuite::nlp::C2FunctionTpl< _Scalar > | |
Scalar | |
Public Attributes inherited from proxsuite::nlp::C1FunctionTpl< _Scalar > | |
Scalar | |
Public Attributes inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
Scalar | |
Public Attributes inherited from proxsuite::nlp::math_types< _Scalar > | |
_Scalar | |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const CostFunctionBaseTpl< Scalar > &cost) |
Additional Inherited Members | |
Protected Attributes inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
int | nx_ |
int | ndx_ |
int | nr_ |
Base class for differentiable cost functions.
using proxsuite::nlp::CostFunctionBaseTpl< Scalar >::Scalar = _Scalar |
Definition at line 32 of file cost-function.hpp.
using proxsuite::nlp::CostFunctionBaseTpl< Scalar >::Base = C2FunctionTpl<Scalar> |
Definition at line 34 of file cost-function.hpp.
|
inline |
Definition at line 36 of file cost-function.hpp.
|
inlineexplicit |
Definition at line 37 of file cost-function.hpp.
|
virtualdefault |
|
pure virtual |
Evaluate the cost function.
Implemented in proxsuite::nlp::CostSumTpl< _Scalar >, proxsuite::nlp::func_to_cost< Scalar >, proxsuite::nlp::QuadraticResidualCostTpl< _Scalar >, and proxsuite::nlp::QuadraticResidualCostTpl< Scalar >.
|
pure virtual |
|
pure virtual |
|
inline |
Definition at line 50 of file cost-function.hpp.
|
inline |
Definition at line 56 of file cost-function.hpp.
|
inlinevirtual |
Evaluate the residual at a given point x.
Implements proxsuite::nlp::BaseFunctionTpl< _Scalar >.
Definition at line 64 of file cost-function.hpp.
|
inlinevirtual |
Jacobian matrix of the constraint function.
Implements proxsuite::nlp::C1FunctionTpl< _Scalar >.
Definition at line 70 of file cost-function.hpp.
|
inlinevirtual |
Vector-hessian product.
Reimplemented from proxsuite::nlp::C2FunctionTpl< _Scalar >.
Definition at line 76 of file cost-function.hpp.
|
friend |
Definition at line 84 of file cost-function.hpp.
proxsuite::nlp::CostFunctionBaseTpl< Scalar >::Scalar |
Definition at line 33 of file cost-function.hpp.