aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::UnaryFunctionTpl< _Scalar > Struct Template Referenceabstract

Represents unary functions of the form \(f(x)\), with no control (or next-state) arguments. More...

#include <aligator/core/unary-function.hpp>

Inheritance diagram for aligator::UnaryFunctionTpl< _Scalar >:
[legend]
Collaboration diagram for aligator::UnaryFunctionTpl< _Scalar >:
[legend]

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 &, const ConstVectorRef &, Data &data) const override
 Evaluate the function.
 
void computeJacobians (const ConstVectorRef &x, const ConstVectorRef &, const ConstVectorRef &, Data &data) const override
 Compute Jacobians of this function.
 
void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &, 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 ndx1, const int nu, const int ndx2, const int nr)
 
 StageFunctionTpl (const int ndx, const int nu, const int nr)
 Constructor where ndx2 = ndx1.
 
virtual ~StageFunctionTpl ()=default
 
virtual shared_ptr< DatacreateData () 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 ndx2
 Next state dimension.
 
const int nr
 Function codimension.
 

Detailed Description

template<typename _Scalar>
struct aligator::UnaryFunctionTpl< _Scalar >

Represents unary functions of the form \(f(x)\), with no control (or next-state) arguments.

Definition at line 12 of file unary-function.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar >
using aligator::UnaryFunctionTpl< _Scalar >::Scalar = _Scalar

Definition at line 13 of file unary-function.hpp.

◆ Base

template<typename _Scalar >
using aligator::UnaryFunctionTpl< _Scalar >::Base = StageFunctionTpl<Scalar>

Definition at line 15 of file unary-function.hpp.

◆ Data

template<typename _Scalar >
using aligator::UnaryFunctionTpl< _Scalar >::Data = StageFunctionDataTpl<Scalar>

Definition at line 16 of file unary-function.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar >
aligator::UnaryFunctionTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate() [1/2]

◆ computeJacobians() [1/2]

◆ computeVectorHessianProducts() [1/2]

template<typename _Scalar >
virtual void aligator::UnaryFunctionTpl< _Scalar >::computeVectorHessianProducts ( const ConstVectorRef & ,
const ConstVectorRef & ,
Data &  ) const
inlinevirtual

◆ evaluate() [2/2]

template<typename _Scalar >
void aligator::UnaryFunctionTpl< _Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
Data & data ) const
inlineoverridevirtual

Evaluate the function.

Parameters
xCurrent state.
uControls.
yNext state.
dataData holding struct.

Implements aligator::StageFunctionTpl< _Scalar >.

Definition at line 26 of file unary-function.hpp.

◆ computeJacobians() [2/2]

template<typename _Scalar >
void aligator::UnaryFunctionTpl< _Scalar >::computeJacobians ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
Data & data ) const
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'}) \)

Parameters
xCurrent state.
uControls.
yNext state.
dataData holding struct.

Implements aligator::StageFunctionTpl< _Scalar >.

Definition at line 31 of file unary-function.hpp.

◆ computeVectorHessianProducts() [2/2]

template<typename _Scalar >
void aligator::UnaryFunctionTpl< _Scalar >::computeVectorHessianProducts ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
const ConstVectorRef & lbda,
Data & data ) const
inlineoverridevirtual

Compute the vector-hessian products of this function.

Parameters
xCurrent state.
uControls.
yNext state.
lbdaMultiplier estimate.
dataData holding struct.

Reimplemented from aligator::StageFunctionTpl< _Scalar >.

Definition at line 36 of file unary-function.hpp.


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