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

Linear function \(f(x,u,y) = Ax + Bu + Cy + d\). More...

#include <aligator/modelling/linear-function.hpp>

Inheritance diagram for aligator::LinearFunctionTpl< Scalar >:
[legend]
Collaboration diagram for aligator::LinearFunctionTpl< Scalar >:
[legend]

Public Types

using Base = StageFunctionTpl<Scalar>
 
using Data = StageFunctionDataTpl<Scalar>
 
- Public Types inherited from aligator::StageFunctionTpl< Scalar >
using Scalar
 
using Data
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 LinearFunctionTpl (const int ndx, const int nu, const int ndx2, const int nr)
 
 LinearFunctionTpl (const ConstMatrixRef A, const ConstMatrixRef B, const ConstMatrixRef C, const ConstVectorRef d)
 
 LinearFunctionTpl (const ConstMatrixRef A, const ConstMatrixRef B, const ConstVectorRef d)
 Constructor where \(C = 0\) is assumed.
 
void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, Data &data) const
 Evaluate the function.
 
void computeJacobians (const ConstVectorRef &, const ConstVectorRef &, const ConstVectorRef &, Data &data) const
 Compute Jacobians of this function.
 
virtual shared_ptr< DatacreateData () const
 Instantiate a Data object.
 
- 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 void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, const ConstVectorRef &lbda, Data &data) const
 Compute the vector-hessian products of this function.
 
virtual ~StageFunctionTpl ()=default
 

Public Attributes

MatrixXs A_
 
MatrixXs B_
 
MatrixXs C_
 
VectorXs d_
 
- 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::LinearFunctionTpl< Scalar >

Linear function \(f(x,u,y) = Ax + Bu + Cy + d\).

Definition at line 9 of file linear-function.hpp.

Member Typedef Documentation

◆ Base

template<typename Scalar >
using aligator::LinearFunctionTpl< Scalar >::Base = StageFunctionTpl<Scalar>

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

◆ Data

template<typename Scalar >
using aligator::LinearFunctionTpl< Scalar >::Data = StageFunctionDataTpl<Scalar>

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

Constructor & Destructor Documentation

◆ LinearFunctionTpl() [1/3]

template<typename Scalar >
aligator::LinearFunctionTpl< Scalar >::LinearFunctionTpl ( const int ndx,
const int nu,
const int ndx2,
const int nr )
inline

Definition at line 20 of file linear-function.hpp.

◆ LinearFunctionTpl() [2/3]

template<typename Scalar >
aligator::LinearFunctionTpl< Scalar >::LinearFunctionTpl ( const ConstMatrixRef A,
const ConstMatrixRef B,
const ConstMatrixRef C,
const ConstVectorRef d )
inline

Definition at line 28 of file linear-function.hpp.

◆ LinearFunctionTpl() [3/3]

template<typename Scalar >
aligator::LinearFunctionTpl< Scalar >::LinearFunctionTpl ( const ConstMatrixRef A,
const ConstMatrixRef B,
const ConstVectorRef d )
inline

Constructor where \(C = 0\) is assumed.

Definition at line 37 of file linear-function.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename Scalar >
aligator::LinearFunctionTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate()

template<typename Scalar >
void aligator::LinearFunctionTpl< Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
Data & data ) const
inlinevirtual

Evaluate the function.

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

Implements aligator::StageFunctionTpl< Scalar >.

Definition at line 41 of file linear-function.hpp.

◆ computeJacobians()

template<typename Scalar >
void aligator::LinearFunctionTpl< Scalar >::computeJacobians ( const ConstVectorRef & ,
const ConstVectorRef & ,
const ConstVectorRef & ,
Data & data ) const
inlinevirtual

Compute Jacobians of this function.

This implementation does nothing: the values of the Jacobians are already set in createData().

Implements aligator::StageFunctionTpl< Scalar >.

Definition at line 51 of file linear-function.hpp.

◆ createData()

template<typename Scalar >
virtual shared_ptr< Data > aligator::LinearFunctionTpl< Scalar >::createData ( ) const
inlinevirtual

Instantiate a Data object.

This override sets the appropriate values of the Jacobians.

Reimplemented from aligator::StageFunctionTpl< Scalar >.

Definition at line 60 of file linear-function.hpp.

Member Data Documentation

◆ A_

template<typename Scalar >
MatrixXs aligator::LinearFunctionTpl< Scalar >::A_

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

◆ B_

template<typename Scalar >
MatrixXs aligator::LinearFunctionTpl< Scalar >::B_

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

◆ C_

template<typename Scalar >
MatrixXs aligator::LinearFunctionTpl< Scalar >::C_

Definition at line 17 of file linear-function.hpp.

◆ d_

template<typename Scalar >
VectorXs aligator::LinearFunctionTpl< Scalar >::d_

Definition at line 18 of file linear-function.hpp.


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