29 string IterativeOptimizationParameters::getVerbosity()
const {
30 return verbosityTranslator(verbosity_);
34 void IterativeOptimizationParameters::setVerbosity(
const string &src) {
35 verbosity_ = verbosityTranslator(src);
45 os <<
"IterativeOptimizationParameters:" << endl <<
"verbosity: "
46 << verbosityTranslator(verbosity_) << endl;
50 bool IterativeOptimizationParameters::equals(
52 return verbosity_ ==
other.verbosity();
68 return IterativeOptimizationParameters::SILENT;
69 else if (
s ==
"COMPLEXITY")
70 return IterativeOptimizationParameters::COMPLEXITY;
71 else if (
s ==
"ERROR")
72 return IterativeOptimizationParameters::ERROR;
75 return IterativeOptimizationParameters::SILENT;
79 string IterativeOptimizationParameters::verbosityTranslator(
81 if (verbosity == SILENT)
83 else if (verbosity == COMPLEXITY)
85 else if (verbosity == ERROR)
93 const KeyInfo* keyInfo,
const std::map<Key, Vector>*
lambda) {
100 const KeyInfo &keyInfo,
const std::map<Key, Vector> &
lambda) {
122 for (
size_t i = 0;
i <
n; ++
i) {
124 const auto it_key = colspec.find(
key);
125 if (it_key==colspec.end())
126 throw std::runtime_error(
"KeyInfo: Inconsistency in key-dim map");
127 const size_t dim = it_key->second;
137 for (
const auto &item: *
this ) {
138 result[item.second.index] = item.second.dim;
146 for (
const auto &item: *
this ) {
147 result.emplace(item.first, Vector::Zero(item.second.dim));