#include <func.h>
Public Member Functions | |
VariableIterator (const Func &f_, bool linear_=true, bool nonlinear_=true, bool quadratic_=false) | |
VariableIterator (const SparsityInfo &sparsity_, bool linear_=true, bool nonlinear_=true, bool quadratic_=false) | |
virtual int | operator() () const |
Returns the index of the current variable. | |
virtual double | coeff_lin () const |
Returns the coefficient in the linear part of this variable, if available. | |
virtual double | coeff_quad () const |
Returns the coefficient in the quadratic part of this variable, if available. | |
virtual VarType | type () const |
The type of the current variable. | |
virtual void | operator++ () |
Moves to next variable. | |
virtual | operator bool () const |
Returns true, if we are not at the end of the variables. | |
Private Member Functions | |
void | init () |
Private Attributes | |
const SparsityInfo & | sparsity |
map< int, SparsityInfo::LinearVariable > ::iterator | it_linear |
map< int, SparsityInfo::NonlinearVariable > ::iterator | it_nonlinear |
map< int, SparsityInfo::QuadraticVariable > ::iterator | it_quadratic |
VarType | whereami |
Over which variable type am I just iterating? |
Definition at line 186 of file func.h.
VariableIterator::VariableIterator | ( | const Func & | f_, | |
bool | linear_ = true , |
|||
bool | nonlinear_ = true , |
|||
bool | quadratic_ = false | |||
) |
VariableIterator::VariableIterator | ( | const SparsityInfo & | sparsity_, | |
bool | linear_ = true , |
|||
bool | nonlinear_ = true , |
|||
bool | quadratic_ = false | |||
) |
void VariableIterator::init | ( | ) | [private] |
virtual int VariableIterator::operator() | ( | ) | const [virtual] |
Returns the index of the current variable.
Implements VariableIterator_Type.
virtual double VariableIterator::coeff_lin | ( | ) | const [virtual] |
Returns the coefficient in the linear part of this variable, if available.
Implements VariableIterator_Type.
virtual double VariableIterator::coeff_quad | ( | ) | const [virtual] |
Returns the coefficient in the quadratic part of this variable, if available.
Implements VariableIterator_Type.
virtual VarType VariableIterator::type | ( | ) | const [inline, virtual] |
The type of the current variable.
Implements VariableIterator_Type.
virtual void VariableIterator::operator++ | ( | ) | [virtual] |
Moves to next variable.
Implements VariableIterator_Type.
virtual VariableIterator::operator bool | ( | ) | const [inline, virtual] |
Returns true, if we are not at the end of the variables.
Implements VariableIterator_Type.
const SparsityInfo& VariableIterator::sparsity [private] |
map<int, SparsityInfo::LinearVariable>::iterator VariableIterator::it_linear [private] |
map<int, SparsityInfo::NonlinearVariable>::iterator VariableIterator::it_nonlinear [private] |
map<int, SparsityInfo::QuadraticVariable>::iterator VariableIterator::it_quadratic [private] |
VarType VariableIterator::whereami [private] |