proxsuite-nlp
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
|
Defines the sum of one or more cost functions \(c_1 + c_2 + \cdots\). More...
#include <proxsuite-nlp/cost-sum.hpp>
Public Types | |
using | Scalar = _Scalar |
using | Base = CostFunctionBaseTpl<Scalar> |
using | BasePtr = shared_ptr<Base> |
Public Types inherited from proxsuite::nlp::CostFunctionBaseTpl< _Scalar > | |
using | Scalar |
using | Base |
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 | |
CostSumTpl (int nx, int ndx) | |
cost component weights | |
CostSumTpl (int nx, int ndx, const std::vector< BasePtr > &comps, const std::vector< Scalar > &weights) | |
Constructor with a predefined vector of components. | |
std::size_t | numComponents () const |
auto | clone () const |
Scalar | call (const ConstVectorRef &x) const |
Evaluate the cost function. | |
void | computeGradient (const ConstVectorRef &x, VectorRef out) const |
void | computeHessian (const ConstVectorRef &x, MatrixRef out) const |
void | addComponent (shared_ptr< Base > comp, const Scalar w=1.) |
CostSumTpl< Scalar > & | operator+= (const shared_ptr< Base > &other) |
CostSumTpl< Scalar > & | operator+= (const CostSumTpl< Scalar > &other) |
CostSumTpl< Scalar > & | operator*= (Scalar rhs) |
Public Member Functions inherited from proxsuite::nlp::CostFunctionBaseTpl< _Scalar > | |
CostFunctionBaseTpl (const int nx, const int ndx) | |
CostFunctionBaseTpl (const ManifoldAbstractTpl< _Scalar > &manifold) | |
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 | |
std::vector< BasePtr > | components_ |
std::vector< Scalar > | weights_ |
component sub-costs | |
Public Attributes inherited from proxsuite::nlp::CostFunctionBaseTpl< _Scalar > | |
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 CostSumTpl< Scalar > &cost) |
auto | operator* (CostSumTpl const &self, Scalar a) -> shared_ptr< CostSumTpl > |
auto | operator* (Scalar a, CostSumTpl const &self) |
auto | operator- (CostSumTpl const &self) |
Additional Inherited Members | |
Protected Attributes inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
int | nx_ |
int | ndx_ |
int | nr_ |
Defines the sum of one or more cost functions \(c_1 + c_2 + \cdots\).
Definition at line 12 of file cost-sum.hpp.
using proxsuite::nlp::CostSumTpl< _Scalar >::Scalar = _Scalar |
Definition at line 14 of file cost-sum.hpp.
using proxsuite::nlp::CostSumTpl< _Scalar >::Base = CostFunctionBaseTpl<Scalar> |
Definition at line 16 of file cost-sum.hpp.
using proxsuite::nlp::CostSumTpl< _Scalar >::BasePtr = shared_ptr<Base> |
Definition at line 17 of file cost-sum.hpp.
|
inline |
cost component weights
Definition at line 22 of file cost-sum.hpp.
|
inline |
Constructor with a predefined vector of components.
Definition at line 25 of file cost-sum.hpp.
|
inline |
Definition at line 31 of file cost-sum.hpp.
|
inline |
Definition at line 33 of file cost-sum.hpp.
|
inlinevirtual |
Evaluate the cost function.
Implements proxsuite::nlp::CostFunctionBaseTpl< _Scalar >.
Definition at line 35 of file cost-sum.hpp.
|
inlinevirtual |
Implements proxsuite::nlp::CostFunctionBaseTpl< _Scalar >.
Definition at line 43 of file cost-sum.hpp.
|
inlinevirtual |
Implements proxsuite::nlp::CostFunctionBaseTpl< _Scalar >.
Definition at line 50 of file cost-sum.hpp.
|
inline |
Definition at line 59 of file cost-sum.hpp.
|
inline |
Definition at line 64 of file cost-sum.hpp.
|
inline |
Definition at line 69 of file cost-sum.hpp.
|
inline |
Definition at line 77 of file cost-sum.hpp.
|
friend |
Definition at line 85 of file cost-sum.hpp.
|
friend |
Definition at line 100 of file cost-sum.hpp.
|
friend |
Definition at line 107 of file cost-sum.hpp.
|
friend |
Definition at line 109 of file cost-sum.hpp.
proxsuite::nlp::CostSumTpl< _Scalar >::Scalar |
Definition at line 15 of file cost-sum.hpp.
std::vector<BasePtr> proxsuite::nlp::CostSumTpl< _Scalar >::components_ |
Definition at line 19 of file cost-sum.hpp.
std::vector<Scalar> proxsuite::nlp::CostSumTpl< _Scalar >::weights_ |
component sub-costs
Definition at line 20 of file cost-sum.hpp.