Further simplifications

parent be023bda
Pipeline #859 passed with stage
in 1 minute and 26 seconds
......@@ -57,7 +57,7 @@ DynamicModel::copyHelper(const DynamicModel &m)
first_chain_rule_derivatives[it.first] = f(it.second);
for (const auto &it : m.equation_type_and_normalized_equation)
equation_type_and_normalized_equation.push_back({it.first, f(it.second)});
equation_type_and_normalized_equation.emplace_back(it.first, f(it.second));
for (const auto &it : m.blocks_derivatives)
{
......@@ -4464,7 +4464,7 @@ DynamicModel::getPacMaxLag(const string &pac_model_name, map<pair<string, string
break;
}
string eq = eqtag_and_lag[{pac_model_name, eqtag}].first;
eqtag_and_lag[{pac_model_name, eqtag}] = {eq, equation->PacMaxLag((*(endogs.begin())).first)};
eqtag_and_lag[{pac_model_name, eqtag}] = {eq, equation->PacMaxLag(endogs.begin()->first)};
}
}
......
......@@ -36,7 +36,7 @@ SteadyStateModel::SteadyStateModel(const SteadyStateModel &m) :
static_model {m.static_model}
{
for (const auto &it : m.def_table)
def_table.push_back({it.first, it.second->clone(*this)});
def_table.emplace_back(it.first, it.second->clone(*this));
}
SteadyStateModel &
......@@ -48,7 +48,7 @@ SteadyStateModel::operator=(const SteadyStateModel &m)
def_table.clear();
for (const auto &it : m.def_table)
def_table.push_back({it.first, it.second->clone(*this)});
def_table.emplace_back(it.first, it.second->clone(*this));
return *this;
}
......@@ -298,7 +298,7 @@ Epilogue::Epilogue(const Epilogue &m) :
DynamicModel {m}
{
for (const auto &it : m.def_table)
def_table.push_back({it.first, it.second->clone(*this)});
def_table.emplace_back(it.first, it.second->clone(*this));
}
Epilogue &
......@@ -308,7 +308,7 @@ Epilogue::operator=(const Epilogue &m)
def_table.clear();
for (const auto &it : m.def_table)
def_table.push_back({it.first, it.second->clone(*this)});
def_table.emplace_back(it.first, it.second->clone(*this));
return *this;
}
......
......@@ -411,7 +411,7 @@ ModelTree::evaluateAndReduceJacobian(const eval_context_t &eval_context, jacob_m
{
if (verbose)
cout << "the coefficient related to variable " << var << " with lag " << lag << " in equation " << eq << " is equal to " << val << " and is set to 0 in the incidence matrix (size=" << symbol_table.endo_nbr() << ")" << endl;
jacobian_elements_to_delete.insert({ eq, deriv_id });
jacobian_elements_to_delete.emplace(eq, deriv_id);
}
else
{
......
......@@ -55,7 +55,7 @@ StaticModel::copyHelper(const StaticModel &m)
first_chain_rule_derivatives[it.first] = f(it.second);
for (const auto &it : m.equation_type_and_normalized_equation)
equation_type_and_normalized_equation.push_back({it.first, f(it.second)});
equation_type_and_normalized_equation.emplace_back(it.first, f(it.second));
for (const auto &it : m.blocks_derivatives)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment