aligator  0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
aligator::DirectSumCostTpl< _Scalar > Struct Template Reference

#include <aligator/modelling/costs/cost-direct-sum.hpp>

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

Classes

struct  Data

Public Types

using Scalar = _Scalar
using BaseCost = CostAbstractTpl<Scalar>
using BaseData = CostDataAbstractTpl<Scalar>
using Manifold = ManifoldAbstractTpl<Scalar>
using PolyCost = xyz::polymorphic<BaseCost>
Public Types inherited from aligator::CostAbstractTpl< _Scalar >
using Scalar = _Scalar
using CostData = CostDataAbstractTpl<Scalar>
using Manifold = ManifoldAbstractTpl<Scalar>

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 DirectSumCostTpl (const PolyCost &c1, const PolyCost &c2)
shared_ptr< BaseDatacreateData () const override
void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
 Evaluate the cost function.
void computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
 Compute the cost gradients \((\ell_x, \ell_u)\).
void computeHessians (const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
 Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
Public Member Functions inherited from aligator::CostAbstractTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
int nx () const
int ndx () const
template<class U>
 CostAbstractTpl (U &&space, const int nu)
virtual ~CostAbstractTpl ()=default

Public Attributes

xyz::polymorphic< BaseCostc1_
xyz::polymorphic< BaseCostc2_
Public Attributes inherited from aligator::CostAbstractTpl< _Scalar >
xyz::polymorphic< Manifoldspace
 State dimension.
int nu
 Control dimension.

Detailed Description

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

Definition at line 10 of file cost-direct-sum.hpp.

Member Typedef Documentation

◆ Scalar

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

Definition at line 11 of file cost-direct-sum.hpp.

◆ BaseCost

template<typename _Scalar>
using aligator::DirectSumCostTpl< _Scalar >::BaseCost = CostAbstractTpl<Scalar>

Definition at line 13 of file cost-direct-sum.hpp.

◆ BaseData

template<typename _Scalar>
using aligator::DirectSumCostTpl< _Scalar >::BaseData = CostDataAbstractTpl<Scalar>

Definition at line 14 of file cost-direct-sum.hpp.

◆ Manifold

template<typename _Scalar>
using aligator::DirectSumCostTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar>

Definition at line 15 of file cost-direct-sum.hpp.

◆ PolyCost

template<typename _Scalar>
using aligator::DirectSumCostTpl< _Scalar >::PolyCost = xyz::polymorphic<BaseCost>

Definition at line 16 of file cost-direct-sum.hpp.

Constructor & Destructor Documentation

◆ DirectSumCostTpl()

template<typename _Scalar>
aligator::DirectSumCostTpl< _Scalar >::DirectSumCostTpl(const PolyCost &c1,
const PolyCost &c2 )
inline

Definition at line 20 of file cost-direct-sum.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

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

◆ createData()

template<typename Scalar>
auto aligator::DirectSumCostTpl< Scalar >::createData()const
overridevirtual

Reimplemented from aligator::CostAbstractTpl< _Scalar >.

Definition at line 122 of file cost-direct-sum.hpp.

◆ evaluate()

template<typename Scalar>
void aligator::DirectSumCostTpl< Scalar >::evaluate(const ConstVectorRef &x,
const ConstVectorRef &u,
BaseData &data ) const
overridevirtual

Evaluate the cost function.

Reimplemented from aligator::CostAbstractTpl< _Scalar >.

Definition at line 56 of file cost-direct-sum.hpp.

◆ computeGradients()

template<typename Scalar>
void aligator::DirectSumCostTpl< Scalar >::computeGradients(const ConstVectorRef &x,
const ConstVectorRef &u,
BaseData &data ) const
overridevirtual

Compute the cost gradients \((\ell_x, \ell_u)\).

Reimplemented from aligator::CostAbstractTpl< _Scalar >.

Definition at line 72 of file cost-direct-sum.hpp.

◆ computeHessians()

template<typename Scalar>
void aligator::DirectSumCostTpl< Scalar >::computeHessians(const ConstVectorRef &x,
const ConstVectorRef &u,
BaseData &data ) const
overridevirtual

Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).

Reimplemented from aligator::CostAbstractTpl< _Scalar >.

Definition at line 94 of file cost-direct-sum.hpp.

Member Data Documentation

◆ c1_

template<typename _Scalar>
xyz::polymorphic<BaseCost> aligator::DirectSumCostTpl< _Scalar >::c1_

Definition at line 27 of file cost-direct-sum.hpp.

◆ c2_

template<typename _Scalar>
xyz::polymorphic<BaseCost> aligator::DirectSumCostTpl< _Scalar >::c2_

Definition at line 27 of file cost-direct-sum.hpp.


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