Provides variable-specific settings for vector- or matrix-valued optimization variables (for internal use). More...
#include <variable_settings.hpp>

Provides variable-specific settings for vector- or matrix-valued optimization variables (for internal use).
The class VariableSettings provides variable-specific settings for enhancing a DVector or a DMatrix to vector- or matrix-valued optimization variables. It is intended for internal use only.
Definition at line 66 of file variable_settings.hpp.
Default constructor.
Definition at line 46 of file variable_settings.cpp.
| VariableSettings::VariableSettings | ( | uint | _dim, |
| VariableType | _type = VT_UNKNOWN, |
||
| const char **const | _names = 0, |
||
| const char **const | _units = 0, |
||
| const DVector & | _scaling = emptyConstVector, |
||
| const DVector & | _lb = emptyConstVector, |
||
| const DVector & | _ub = emptyConstVector, |
||
| BooleanType | _autoInit = defaultAutoInit |
||
| ) |
Constructor which takes all settings.
| [in] | _dim | Dimension of variable. |
| [in] | _type | Type of the variable. |
| [in] | _names | Array containing name labels for each component of the variable. |
| [in] | _units | Array containing unit labels for each component of the variable. |
| [in] | _scaling | Scaling for each component of the variable. |
| [in] | _lb | Lower bounds for each component of the variable. |
| [in] | _ub | Upper bounds for each component of the variable. |
| [in] | _autoInit | Flag indicating whether variable is to be automatically initialized. |
Definition at line 58 of file variable_settings.cpp.
| VariableSettings::VariableSettings | ( | const VariableSettings & | rhs | ) |
Copy constructor (deep copy).
| [in] | rhs | Right-hand side object. |
Definition at line 75 of file variable_settings.cpp.
Destructor.
Definition at line 145 of file variable_settings.cpp.
| returnValue VariableSettings::appendSettings | ( | const VariableSettings & | rhs | ) |
Appends given VariableSettings object as additional components to the current one.
| [in] | rhs | VariableSettings to be appended. |
Definition at line 264 of file variable_settings.cpp.
| returnValue VariableSettings::appendSettings | ( | uint | _dim, |
| const char **const | _names, | ||
| const char **const | _units, | ||
| const DVector & | _scaling = emptyConstVector, |
||
| const DVector & | _lb = emptyConstVector, |
||
| const DVector & | _ub = emptyConstVector |
||
| ) |
Appends given VariableSettings object as additional components to the current one.
| [in] | _dim | Dimension of variable. |
| [in] | _names | Array containing name labels for each component of the variable. |
| [in] | _units | Array containing unit labels for each component of the variable. |
| [in] | _scaling | Array containing the scaling for each component of the variable. |
| [in] | _lb | Array containing lower bounds for each component of the variable. |
| [in] | _ub | Array containing upper bounds for each component of the variable. |
Definition at line 271 of file variable_settings.cpp.
| returnValue VariableSettings::clear | ( | ) | [protected] |
Clears all settings.
Definition at line 539 of file variable_settings.cpp.
| BooleanType VariableSettings::getAutoInit | ( | ) | const [inline] |
Returns whether automatic initialization is enabled or not.
| double VariableSettings::getLowerBound | ( | uint | idx | ) | const [inline] |
Returns current lower bound of given component.
| [in] | idx | Index of component. |
| DVector VariableSettings::getLowerBounds | ( | ) | const [inline] |
Returns current lower bounds.
| returnValue VariableSettings::getName | ( | uint | idx, |
| char * | _name | ||
| ) | const |
Returns current name label of given component.
| [in] | idx | Index of component. |
| [out] | _name | Name label of given component. |
Definition at line 441 of file variable_settings.cpp.
| DVector VariableSettings::getScaling | ( | ) | const [inline] |
Returns current scaling.
| double VariableSettings::getScaling | ( | uint | idx | ) | const [inline] |
Returns current scaling of given component.
| [in] | idx | Index of component. |
| VariableType VariableSettings::getType | ( | ) | const [inline] |
Returns current variable type.
| returnValue VariableSettings::getUnit | ( | uint | idx, |
| char * | _unit | ||
| ) | const |
Returns current unit label of given component.
| [in] | idx | Index of component. |
| [out] | _unit | Unit label of given component. |
Definition at line 488 of file variable_settings.cpp.
| double VariableSettings::getUpperBound | ( | uint | idx | ) | const [inline] |
Returns current upper bound of given component.
| [in] | idx | Index of component. |
| DVector VariableSettings::getUpperBounds | ( | ) | const [inline] |
Returns current upper bounds.
| BooleanType VariableSettings::hasLowerBounds | ( | ) | const [inline] |
Returns whether VariableSettings comprises lower bounds (at at least one of its grid points).
| BooleanType VariableSettings::hasNames | ( | ) | const [inline] |
Returns whether VariableSettings comprises (non-empty) name labels (at at least one of its grid points).
| BooleanType VariableSettings::hasScaling | ( | ) | const [inline] |
Returns whether scaling is set (at at least one grid point).
| BooleanType VariableSettings::hasUnits | ( | ) | const [inline] |
Returns whether VariableSettings comprises (non-empty) unit labels (at at least one of its grid points).
| BooleanType VariableSettings::hasUpperBounds | ( | ) | const [inline] |
Returns whether VariableSettings comprises upper bounds (at at least one of its grid points).
Initializes empty object.
Definition at line 228 of file variable_settings.cpp.
| returnValue VariableSettings::init | ( | uint | _dim, |
| VariableType | _type, | ||
| const char **const | _names, | ||
| const char **const | _units, | ||
| const DVector & | _scaling = emptyConstVector, |
||
| const DVector & | _lb = emptyConstVector, |
||
| const DVector & | _ub = emptyConstVector, |
||
| BooleanType | _autoInit = defaultAutoInit |
||
| ) |
Initializes object with given dimension and settings.
| [in] | _dim | Dimension of variable. |
| [in] | _type | Type of the variable. |
| [in] | _names | Array containing name labels for each component of the variable. |
| [in] | _units | Array containing unit labels for each component of the variable. |
| [in] | _scaling | Array containing the scaling for each component of the variable. |
| [in] | _lb | Array containing lower bounds for each component of the variable. |
| [in] | _ub | Array containing upper bounds for each component of the variable. |
| [in] | _autoInit | Array defining if each component of the variable is to be automatically initialized. |
Definition at line 244 of file variable_settings.cpp.
| VariableSettings & VariableSettings::operator= | ( | const VariableSettings & | rhs | ) |
Copy constructor (deep copy).
| [in] | rhs | Right-hand side object. |
Definition at line 151 of file variable_settings.cpp.
| returnValue VariableSettings::setAutoInit | ( | BooleanType | _autoInit | ) | [inline] |
Assigns new auto initialization flag.
| [in] | _autoInit | New auto initialization flag. |
| returnValue VariableSettings::setLowerBound | ( | uint | idx, |
| double | _lb | ||
| ) | [inline] |
Assigns new lower bound to given component.
| [in] | idx | Index of component. |
| [in] | _lb | New lower bound. |
| returnValue VariableSettings::setLowerBounds | ( | const DVector & | _lb | ) | [inline] |
Assigns new lower bounds.
| [in] | _lb | New lower bounds. |
| returnValue VariableSettings::setName | ( | uint | idx, |
| const char *const | _name | ||
| ) |
Assigns new name label to given component.
| [in] | idx | Index of component. |
| [in] | _name | New name label. |
Definition at line 458 of file variable_settings.cpp.
| returnValue VariableSettings::setScaling | ( | const DVector & | _scaling | ) | [inline] |
Assigns new scaling.
| [in] | _scaling | New scaling. |
| returnValue VariableSettings::setScaling | ( | uint | idx, |
| double | _scaling | ||
| ) | [inline] |
Assigns new scaling to given component.
| [in] | idx | Index of component. |
| [in] | _scaling | New scaling. |
| returnValue VariableSettings::setType | ( | VariableType | _type | ) | [inline] |
Assigns new variable type.
| [in] | _type | New variable type. |
| returnValue VariableSettings::setUnit | ( | uint | idx, |
| const char *const | _unit | ||
| ) |
Assigns new unit label to given component.
| [in] | idx | Index of component. |
| [in] | _unit | New unit label. |
Definition at line 505 of file variable_settings.cpp.
| returnValue VariableSettings::setUpperBound | ( | uint | idx, |
| double | _ub | ||
| ) | [inline] |
Assigns new upper bound to given component.
| [in] | idx | Index of component. |
| [in] | _ub | New upper bound. |
| returnValue VariableSettings::setUpperBounds | ( | const DVector & | _ub | ) | [inline] |
Assigns new upper bounds.
| [in] | _ub | New upper bounds. |
BooleanType VariableSettings::autoInit [protected] |
Flag indicating whether variable is to be automatically initialized.
Definition at line 455 of file variable_settings.hpp.
uint VariableSettings::dim [protected] |
Dimension of variable.
Definition at line 444 of file variable_settings.hpp.
DVector VariableSettings::lb [protected] |
Lower bounds for each component of the variable.
Definition at line 452 of file variable_settings.hpp.
char** VariableSettings::names [protected] |
Array containing name labels for each component of the variable..
Definition at line 447 of file variable_settings.hpp.
DVector VariableSettings::scaling [protected] |
Scaling for each component of the variable.
Definition at line 450 of file variable_settings.hpp.
VariableType VariableSettings::type [protected] |
Type of the variable.
Definition at line 445 of file variable_settings.hpp.
DVector VariableSettings::ub [protected] |
Upper bounds for each component of the variable.
Definition at line 453 of file variable_settings.hpp.
char** VariableSettings::units [protected] |
Array containing unit labels for each component of the variable..
Definition at line 448 of file variable_settings.hpp.