Public Member Functions | Private Member Functions | List of all members
ifopt::CostTerm Class Referenceabstract

A container holding a single cost term. More...

#include <cost_term.h>

Inheritance diagram for ifopt::CostTerm:
Inheritance graph
[legend]

Public Member Functions

 CostTerm (const std::string &name)
 
VecBound GetBounds () const final
 Returns infinite bounds (e.g. no bounds). More...
 
VectorXd GetValues () const final
 Wrapper function that converts double to Eigen::VectorXd. More...
 
void Print (double tol, int &index) const final
 
virtual ~CostTerm ()=default
 
- Public Member Functions inherited from ifopt::ConstraintSet
 ConstraintSet (int n_constraints, const std::string &name)
 Creates constraints on the variables x. More...
 
virtual void FillJacobianBlock (std::string var_set, Jacobian &jac_block) const =0
 Set individual Jacobians corresponding to each decision variable set. More...
 
Jacobian GetJacobian () const final
 The matrix of derivatives for these constraints and variables. More...
 
void LinkWithVariables (const VariablesPtr &x)
 Connects the constraint with the optimization variables. More...
 
virtual ~ConstraintSet ()=default
 
- Public Member Functions inherited from ifopt::Component
 Component (int num_rows, const std::string &name)
 Creates a component. More...
 
std::string GetName () const
 Returns the name (id) of this component. More...
 
int GetRows () const
 Returns the number of rows of this component. More...
 
void SetRows (int num_rows)
 Sets the number of rows of this component. More...
 
virtual ~Component ()=default
 

Private Member Functions

virtual double GetCost () const =0
 Returns the scalar cost term calculated from the variables. More...
 

Additional Inherited Members

- Public Types inherited from ifopt::ConstraintSet
using Ptr = std::shared_ptr< ConstraintSet >
 
using VariablesPtr = Composite::Ptr
 
- Public Types inherited from ifopt::Component
using Jacobian = Eigen::SparseMatrix< double, Eigen::RowMajor >
 
using Ptr = std::shared_ptr< Component >
 
using VecBound = std::vector< Bounds >
 
using VectorXd = Eigen::VectorXd
 
- Static Public Attributes inherited from ifopt::Component
static const int kSpecifyLater = -1
 
- Protected Member Functions inherited from ifopt::ConstraintSet
const VariablesPtr GetVariables () const
 Read access to the value of the optimization variables. More...
 

Detailed Description

A container holding a single cost term.

This container builds a scalar cost term from the values of the variables. This can be seen as a constraint with only one row and no bounds.

See also
Component

Definition at line 73 of file cost_term.h.

Constructor & Destructor Documentation

◆ CostTerm()

ifopt::CostTerm::CostTerm ( const std::string &  name)

Definition at line 113 of file leaves.cc.

◆ ~CostTerm()

virtual ifopt::CostTerm::~CostTerm ( )
virtualdefault

Member Function Documentation

◆ GetBounds()

CostTerm::VecBound ifopt::CostTerm::GetBounds ( ) const
finalvirtual

Returns infinite bounds (e.g. no bounds).

Implements ifopt::Component.

Definition at line 126 of file leaves.cc.

◆ GetCost()

virtual double ifopt::CostTerm::GetCost ( ) const
privatepure virtual

Returns the scalar cost term calculated from the variables.

Implemented in ifopt::ExCost.

◆ GetValues()

CostTerm::VectorXd ifopt::CostTerm::GetValues ( ) const
finalvirtual

Wrapper function that converts double to Eigen::VectorXd.

Implements ifopt::Component.

Definition at line 118 of file leaves.cc.

◆ Print()

void ifopt::CostTerm::Print ( double  tol,
int &  index 
) const
finalvirtual

Cost term printout slightly different from variables/constraints.

Reimplemented from ifopt::Component.

Definition at line 132 of file leaves.cc.


The documentation for this class was generated from the following files:


ifopt
Author(s): Alexander W. Winkler
autogenerated on Thu Sep 15 2022 02:14:55