|
aligator
0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
Represents unary functions of the form \(f(x)\), with no control (or next-state) arguments. More...
#include <aligator/core/unary-function.hpp>
Public Types | |
| using | Scalar = _Scalar |
| using | Base = StageFunctionTpl<Scalar> |
| using | Data = StageFunctionDataTpl<Scalar> |
Public Types inherited from aligator::StageFunctionTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | Data = StageFunctionDataTpl<Scalar> |
Public Member Functions | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| virtual void | evaluate (const ConstVectorRef &x, Data &data) const =0 |
| virtual void | computeJacobians (const ConstVectorRef &x, Data &data) const =0 |
| virtual void | computeVectorHessianProducts (const ConstVectorRef &, const ConstVectorRef &, Data &) const |
| void | evaluate (const ConstVectorRef &x, const ConstVectorRef &, Data &data) const override |
| Evaluate the function. | |
| void | computeJacobians (const ConstVectorRef &x, const ConstVectorRef &, Data &data) const override |
| Compute Jacobians of this function. | |
| void | computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &, const ConstVectorRef &lbda, Data &data) const override |
| Compute the vector-hessian products of this function. | |
Public Member Functions inherited from aligator::StageFunctionTpl< _Scalar > | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| StageFunctionTpl (const int ndx, const int nu, const int nr) | |
| virtual | ~StageFunctionTpl ()=default |
| virtual shared_ptr< Data > | createData () const |
| Instantiate a Data object. | |
Additional Inherited Members | |
Public Attributes inherited from aligator::StageFunctionTpl< _Scalar > | |
| const int | ndx1 |
| Current state dimension. | |
| const int | nu |
| Control dimension. | |
| const int | nr |
| Function codimension. | |
Represents unary functions of the form \(f(x)\), with no control (or next-state) arguments.
Definition at line 12 of file unary-function.hpp.
| using aligator::UnaryFunctionTpl< _Scalar >::Scalar = _Scalar |
Definition at line 13 of file unary-function.hpp.
| using aligator::UnaryFunctionTpl< _Scalar >::Base = StageFunctionTpl<Scalar> |
Definition at line 15 of file unary-function.hpp.
| using aligator::UnaryFunctionTpl< _Scalar >::Data = StageFunctionDataTpl<Scalar> |
Definition at line 16 of file unary-function.hpp.
| aligator::UnaryFunctionTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
pure virtual |
Implemented in aligator::FlyHighResidualTpl< _Scalar >::Data, aligator::FlyHighResidualTpl< _Scalar >, aligator::FramePlacementResidualTpl< _Scalar >, aligator::FunctionSliceXprTpl< Scalar, UnaryFunctionTpl< Scalar > >, aligator::LinearUnaryFunctionCompositionTpl< _Scalar >, and aligator::python::PyUnaryFunction< UFunction >.
|
pure virtual |
Implemented in aligator::FlyHighResidualTpl< _Scalar >, aligator::FlyHighResidualTpl< _Scalar >::Data, aligator::FramePlacementResidualTpl< _Scalar >, aligator::FunctionSliceXprTpl< Scalar, UnaryFunctionTpl< Scalar > >, aligator::LinearUnaryFunctionCompositionTpl< _Scalar >, and aligator::python::PyUnaryFunction< UFunction >.
|
inlinevirtual |
Reimplemented in aligator::FunctionSliceXprTpl< Scalar, UnaryFunctionTpl< Scalar > >, and aligator::python::PyUnaryFunction< UFunction >.
Definition at line 22 of file unary-function.hpp.
|
inlineoverridevirtual |
Evaluate the function.
| x | Current state. |
| u | Controls. |
| data | Data holding struct. |
Implements aligator::StageFunctionTpl< _Scalar >.
Definition at line 26 of file unary-function.hpp.
|
inlineoverridevirtual |
Compute Jacobians of this function.
This computes the Jacobians \( (\frac{\partial f}{\partial x}, \frac{\partial f}{\partial u}, \frac{\partial f}{\partial x'}) \)
| x | Current state. |
| u | Controls. |
| y | Next state. |
| data | Data holding struct. |
Implements aligator::StageFunctionTpl< _Scalar >.
Definition at line 31 of file unary-function.hpp.
|
inlineoverridevirtual |
Compute the vector-hessian products of this function.
| x | Current state. |
| u | Controls. |
| y | Next state. |
| lbda | Multiplier estimate. |
| data | Data holding struct. |
Reimplemented from aligator::StageFunctionTpl< _Scalar >.
Definition at line 36 of file unary-function.hpp.