18 std::vector<std::string>& writtenNames,
19 bool printComma)
const 24 bool flag = printComma;
25 for (
size_t i = 0; i < pl.
size(); ++i)
27 if (find(writtenNames.begin(), writtenNames.end(), pl[i].getName()) == writtenNames.end())
35 (out << pname <<
"=").enableScientificNotation(
false) << pl[i].getValue();
43 std::map<std::string, std::string>& globalAliases,
44 const std::vector<std::string>& names,
45 std::vector<std::string>& writtenNames,
46 bool printLocalAliases,
47 bool printComma)
const 52 bool flag = printComma;
53 for (
size_t i = 0; i < pl.
size(); ++i)
55 if (find(writtenNames.begin(), writtenNames.end(), pl[i].getName()) == writtenNames.end())
64 if (globalAliases.find(pl[i].getName()) == globalAliases.end())
66 (out << pname <<
"=").enableScientificNotation(
false) << pl[i].getValue();
69 out << pname <<
"=" << globalAliases[pl[i].getName()];
72 if (printLocalAliases)
74 vector<string> aliases = parametrizable.
getAlias(pname);
75 for (
size_t j = 0; j < aliases.size(); ++j)
77 out <<
", " << aliases[j] <<
"=" << pname;
80 writtenNames.push_back(pl[i].getName());
virtual int getPrecision() const =0
Extend the Parametrizable interface with support for parameter aliases.
virtual ParameterList createSubList(const std::vector< std::string > &names) const
Get given parameters as a sublist.
virtual std::vector< std::string > getAlias(const std::string &name) const =0
virtual const ParameterList & getParameters() const =0
Get all parameters available.
This is the interface for all objects that imply parameters.
The parameter list object.
virtual OutputStream & setPrecision(int digit)=0
virtual const ParameterList & getIndependentParameters() const =0
Get the minimal list of parameters to set the model.
virtual std::string getParameterNameWithoutNamespace(const std::string &name) const =0
Resolves a parameter name according to the current namespace.