Serializes a given symbol and lists it into a vector.
More...
#include <variableLister.h>
|
| VariableLister (std::vector< OptimizationVariable > &variables, std::vector< double > &initials, std::unordered_map< std::string, int > &positions) |
| Constructor. More...
|
|
void | dispatch (base_symbol *sym) |
| Dispatch function. More...
|
|
|
Specific visit implementations
|
template<typename TType > |
void | operator() (value_symbol< TType > *sym) |
|
template<unsigned IDim> |
void | operator() (value_symbol< real< IDim >> *sym) |
|
template<unsigned IDim> |
void | operator() (parameter_symbol< real< IDim >> *sym) |
|
template<unsigned IDim> |
void | operator() (variable_symbol< real< IDim >> *sym) |
|
void | operator() (variable_symbol< real< 0 >> *sym) |
|
Serializes a given symbol and lists it into a vector.
◆ VariableLister()
maingo::VariableLister::VariableLister |
( |
std::vector< OptimizationVariable > & |
variables, |
|
|
std::vector< double > & |
initials, |
|
|
std::unordered_map< std::string, int > & |
positions |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[out] | variables | is the resulting vector of variables |
[out] | initials | is the resulting vector of initial values |
[out] | positions | maps symbol names to positions in the variable vector |
◆ dispatch()
void maingo::VariableLister::dispatch |
( |
base_symbol * |
sym | ) |
|
|
inline |
Dispatch function.
- Parameters
-
[in] | sym | is the symbol to be serialized |
◆ operator()() [1/5]
template<typename TType >
void maingo::VariableLister::operator() |
( |
value_symbol< TType > * |
sym | ) |
|
|
inline |
◆ operator()() [2/5]
template<unsigned IDim>
void maingo::VariableLister::operator() |
( |
value_symbol< real< IDim >> * |
sym | ) |
|
|
inline |
◆ operator()() [3/5]
template<unsigned IDim>
void maingo::VariableLister::operator() |
( |
parameter_symbol< real< IDim >> * |
sym | ) |
|
|
inline |
◆ operator()() [4/5]
template<unsigned IDim>
void maingo::VariableLister::operator() |
( |
variable_symbol< real< IDim >> * |
sym | ) |
|
|
inline |
◆ operator()() [5/5]
void maingo::VariableLister::operator() |
( |
variable_symbol< real< 0 >> * |
sym | ) |
|
|
inline |
◆ _initials
std::vector<double>& maingo::VariableLister::_initials |
|
private |
◆ _positions
std::unordered_map<std::string, int>& maingo::VariableLister::_positions |
|
private |
Positions of symbols in the variable vector
◆ _variables
The documentation for this class was generated from the following file: