Drake
DecisionVariableView Class Reference

#include <drake/solvers/Optimization.h>

Public Member Functions

 DecisionVariableView (const DecisionVariable &var)
 Create a view which covers an entire DecisionVariable. More...
 
 DecisionVariableView (const DecisionVariable &var, size_t start, size_t n)
 Create a view covering part of a DecisionVariable. More...
 
size_t index () const
 index() More...
 
size_t size () const
 size() More...
 
Eigen::VectorBlock< const Eigen::VectorXd, Eigen::Dynamic > value () const
 value() More...
 
std::string name () const
 
bool covers (size_t var_index) const
 covers() More...
 
const DecisionVariableView operator() (size_t i) const
 
const DecisionVariableView row (size_t i) const
 
const DecisionVariableView head (size_t n) const
 
const DecisionVariableView tail (size_t n) const
 
const DecisionVariableView segment (size_t start, size_t n) const
 

Constructor & Destructor Documentation

DecisionVariableView ( const DecisionVariable var)
inlineexplicit

Create a view which covers an entire DecisionVariable.

var is aliased, and must remain valid for the lifetime of the view.

DecisionVariableView ( const DecisionVariable var,
size_t  start,
size_t  n 
)
inline

Create a view covering part of a DecisionVariable.

var is aliased, and must remain valid for the lifetime of the view.

Here is the call graph for this function:

Member Function Documentation

bool covers ( size_t  var_index) const
inline

covers()

returns true iff the given index of the enclosing OptimizationProblem is included in this VariableView.

Here is the call graph for this function:

const DecisionVariableView head ( size_t  n) const
inline
size_t index ( ) const
inline

index()

returns the first index of this variable in the entire variable vector for the program

Here is the caller graph for this function:

std::string name ( ) const
inline

Here is the call graph for this function:

const DecisionVariableView operator() ( size_t  i) const
inline
const DecisionVariableView row ( size_t  i) const
inline
const DecisionVariableView segment ( size_t  start,
size_t  n 
) const
inline
size_t size ( ) const
inline

size()

returns the number of elements in the decision variable vector

Here is the caller graph for this function:

const DecisionVariableView tail ( size_t  n) const
inline
Eigen::VectorBlock<const Eigen::VectorXd, Eigen::Dynamic> value ( ) const
inline

value()

returns the actual stored value; which is only meaningful after calling solve() in the program.


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