65 name = std::vector<std::string>(
value.size(),
"");
89 void push_back(
const mc::FFVar var,
const std::string &str)
100 for (
size_t i = 0; i < vars.size(); i++) {
101 value.push_back(vars[i]);
109 void push_back(
const std::vector<mc::FFVar> &vars,
const std::string &baseName)
111 if (vars.size() == 1) {
112 value.push_back(vars[0]);
113 name.push_back(baseName);
115 else if (baseName ==
"") {
119 for (
size_t i = 0; i < vars.size(); i++) {
120 value.push_back(vars[i]);
121 name.push_back(baseName +
'_' + std::to_string(i + 1));
154 void set_name(
const std::string str,
const unsigned i)
165 value.push_back(var);
182 inline mc::FFVar &
at(
const unsigned int i)
mc::FFVar & operator[](const unsigned int i)
[] operator for easier access to value vector
Definition: evaluationContainer.h:174
void clear()
Clears all information, note that currently objective has not to be cleared, since it is overwritten...
Definition: evaluationContainer.h:220
ModelFunction & operator=(const mc::FFVar var)
= operator for backward compatibility
Definition: evaluationContainer.h:162
ModelFunction(const mc::FFVar var)
Constructor with FFVar value only.
Definition: evaluationContainer.h:40
std::vector< std::string > name
Definition: evaluationContainer.h:195
void push_back(const std::vector< mc::FFVar > &vars, const std::string &baseName)
Function for inserting a vector of FFVar at the end of the value vector with names.
Definition: evaluationContainer.h:109
void set_name(const std::string str, const unsigned i)
Function for seting name value at a given index.
Definition: evaluationContainer.h:154
ModelFunction(const mc::FFVar var, const std::string &str)
Constructor with FFVar value and a name.
Definition: evaluationContainer.h:51
std::vector< OutputVariable > output
Definition: evaluationContainer.h:215
Struct for making work with the EvaluationContainer easier for the user and also to ensure backward c...
Definition: evaluationContainer.h:28
void set_value(const mc::FFVar var, const unsigned i)
Function for seting FFVar value at a given index.
Definition: evaluationContainer.h:146
void push_back(const mc::FFVar var, const std::string &str)
Function for inserting a FFVar and a name at the end of the vectors.
Definition: evaluationContainer.h:89
ModelFunction eqRelaxationOnly
Definition: evaluationContainer.h:213
bool operator==(const ModelFunction &other) const
Equality comparison operator.
Definition: evaluationContainer.h:190
Struct for storing the values returned by model evaluation at the given point "var".
Definition: evaluationContainer.h:208
void push_back(const std::vector< mc::FFVar > &vars)
Function for inserting a vector of FFVar at the end of the value vector.
Definition: evaluationContainer.h:98
ModelFunction objective
Definition: evaluationContainer.h:209
size_t size() const
Function returning the size of the value vector. Note that value and name vectors have the same size ...
Definition: evaluationContainer.h:129
void clear()
Function deleting everything in the model function.
Definition: evaluationContainer.h:71
ModelFunction ineq
Definition: evaluationContainer.h:210
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
ModelFunction ineqSquash
Definition: evaluationContainer.h:214
std::vector< mc::FFVar > value
Definition: evaluationContainer.h:196
ModelFunction eq
Definition: evaluationContainer.h:211
void resize(const size_t size)
Function for resizing of the underlying vectors.
Definition: evaluationContainer.h:137
ModelFunction(const std::vector< mc::FFVar > &vars)
Constructor with vector of FFVar.
Definition: evaluationContainer.h:62
mc::FFVar & at(const unsigned int i)
Function for accessing elements.
Definition: evaluationContainer.h:182
ModelFunction & operator=(const ModelFunction &)=default
void push_back(const mc::FFVar var)
Function for inserting a FFVar value at the end of the value vector.
Definition: evaluationContainer.h:80
ModelFunction ineqRelaxationOnly
Definition: evaluationContainer.h:212