Weighted quadratic distance \(\frac{1}{2}\|x\ominus \bar{x}\|^2_W\) on a space. More...
#include <proxsuite-nlp/modelling/costs/squared-distance.hpp>
Public Types | |
| using | Scalar = _Scalar |
| using | StateResidual = ManifoldDifferenceToPoint<Scalar> |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
| using | Base = QuadraticResidualCostTpl<Scalar> |
Public Types inherited from proxsuite::nlp::QuadraticResidualCostTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | FunctionType = C2FunctionTpl<Scalar> |
| using | RowMatrixXs = Eigen::Matrix<Scalar, -1, -1, Eigen::RowMajor> |
| using | Base = CostFunctionBaseTpl<Scalar> |
| using | FunctionPtr = shared_ptr<FunctionType> |
Public Types inherited from proxsuite::nlp::CostFunctionBaseTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | Base = C2FunctionTpl<Scalar> |
Public Types inherited from proxsuite::nlp::C2FunctionTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | Base = C1FunctionTpl<_Scalar> |
Public Types inherited from proxsuite::nlp::C1FunctionTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | Base = BaseFunctionTpl<_Scalar> |
Public Types inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
| using | Scalar = _Scalar |
Public Types inherited from proxsuite::nlp::math_types< _Scalar > | |
| using | Scalar = _Scalar |
Public Member Functions | |
| QuadraticDistanceCostTpl (const polymorphic< Manifold > &space, const ConstVectorRef &target, const ConstMatrixRef &weights) | |
| QuadraticDistanceCostTpl (const polymorphic< Manifold > &space, const ConstVectorRef &target) | |
| QuadraticDistanceCostTpl (const polymorphic< Manifold > &space) | |
| ConstVectorRef | getTarget () const |
| void | updateTarget (const ConstVectorRef &x) |
Public Member Functions inherited from proxsuite::nlp::QuadraticResidualCostTpl< _Scalar > | |
| QuadraticResidualCostTpl (FunctionPtr residual, const ConstMatrixRef &weights, const ConstVectorRef &slope, const Scalar constant=Scalar(0.)) | |
| QuadraticResidualCostTpl (FunctionPtr residual, const ConstMatrixRef &weights, const Scalar constant=Scalar(0.)) | |
| template<typename Underlying, typename... ResidualArgs> | |
| QuadraticResidualCostTpl (const ConstMatrixRef &weights, const ConstVectorRef &slope, const Scalar constant, ResidualArgs &...args) | |
| Constructor using the template parameter as the underlying type of the residual. | |
| 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 |
| VectorXs | computeGradient (const ConstVectorRef &x) const |
| MatrixXs | computeHessian (const ConstVectorRef &x) const |
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. | |
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) | |
| 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 | |
| FunctionPtr | residual_ |
| Residual function \(r(x)\) the composite cost is constructed over. | |
| MatrixXs | weights_ |
| Weights \(Q\). | |
Public Attributes inherited from proxsuite::nlp::QuadraticResidualCostTpl< _Scalar > | |
| Scalar | |
| FunctionPtr | residual_ |
| Residual function \(r(x)\) the composite cost is constructed over. | |
| MatrixXs | weights_ |
| Weights \(Q\). | |
| VectorXs | slope_ |
| Slope \(b\). | |
| Scalar | constant_ |
| Constant term \(c\). | |
| bool | gauss_newton_ |
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 | |
Additional Inherited Members | |
Protected Attributes inherited from proxsuite::nlp::QuadraticResidualCostTpl< _Scalar > | |
| VectorXs | err |
| VectorXs | tmp_w_err |
| MatrixXs | Jres |
| RowMatrixXs | JtW |
| MatrixXs | H |
Protected Attributes inherited from proxsuite::nlp::BaseFunctionTpl< _Scalar > | |
| int | nx_ |
| int | ndx_ |
| int | nr_ |
Weighted quadratic distance \(\frac{1}{2}\|x\ominus \bar{x}\|^2_W\) on a space.
This function subclasses from QuadraticResidualCost and provides a convenient constructor. It uses ManifoldDifferenceToPoint under the hood as the input residual for the parent. This struct also exposes a method to update the target point.
Definition at line 18 of file squared-distance.hpp.
| using proxsuite::nlp::QuadraticDistanceCostTpl< _Scalar >::Scalar = _Scalar |
Definition at line 19 of file squared-distance.hpp.
| using proxsuite::nlp::QuadraticDistanceCostTpl< _Scalar >::StateResidual = ManifoldDifferenceToPoint<Scalar> |
Definition at line 21 of file squared-distance.hpp.
| using proxsuite::nlp::QuadraticDistanceCostTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 22 of file squared-distance.hpp.
| using proxsuite::nlp::QuadraticDistanceCostTpl< _Scalar >::Base = QuadraticResidualCostTpl<Scalar> |
Definition at line 23 of file squared-distance.hpp.
|
inline |
Definition at line 27 of file squared-distance.hpp.
|
inline |
Definition at line 32 of file squared-distance.hpp.
|
inline |
Definition at line 37 of file squared-distance.hpp.
|
inline |
Definition at line 40 of file squared-distance.hpp.
|
inline |
Definition at line 44 of file squared-distance.hpp.
| proxsuite::nlp::QuadraticDistanceCostTpl< _Scalar >::Scalar |
Definition at line 20 of file squared-distance.hpp.
| FunctionPtr proxsuite::nlp::QuadraticResidualCostTpl< Scalar >::residual_ |
Residual function \(r(x)\) the composite cost is constructed over.
Definition at line 34 of file quadratic-residual.hpp.
| MatrixXs proxsuite::nlp::QuadraticResidualCostTpl< Scalar >::weights_ |
Weights \(Q\).
Definition at line 36 of file quadratic-residual.hpp.