Commit 608c4345 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Replace most calls to make_pair by braced-initializer lists or emplace()/emplace_back()

parent 7d9cd718
......@@ -1730,14 +1730,14 @@ public:
# ifdef DEBUGL
mexPrintf("FLDZ = %d size = %d\n", FLDZ, sizeof(FLDZ_));
# endif
tags_liste.push_back(make_pair(FLDZ, code));
tags_liste.emplace_back(FLDZ, code);
code += sizeof(FLDZ_);
break;
case FEND:
# ifdef DEBUGL
mexPrintf("FEND\n");
# endif
tags_liste.push_back(make_pair(FEND, code));
tags_liste.emplace_back(FEND, code);
code += sizeof(FEND_);
done = true;
break;
......@@ -1745,203 +1745,203 @@ public:
# ifdef DEBUGL
mexPrintf("FENDBLOCK\n");
# endif
tags_liste.push_back(make_pair(FENDBLOCK, code));
tags_liste.emplace_back(FENDBLOCK, code);
code += sizeof(FENDBLOCK_);
break;
case FENDEQU:
# ifdef DEBUGL
mexPrintf("FENDEQU\n");
# endif
tags_liste.push_back(make_pair(FENDEQU, code));
tags_liste.emplace_back(FENDEQU, code);
code += sizeof(FENDEQU_);
break;
case FCUML:
# ifdef DEBUGL
mexPrintf("FCUML\n");
# endif
tags_liste.push_back(make_pair(FCUML, code));
tags_liste.emplace_back(FCUML, code);
code += sizeof(FCUML_);
break;
case FDIMT:
# ifdef DEBUGL
mexPrintf("FDIMT = %d size = %d\n", FDIMT, sizeof(FDIMT_));
# endif
tags_liste.push_back(make_pair(FDIMT, code));
tags_liste.emplace_back(FDIMT, code);
code += sizeof(FDIMT_);
break;
case FDIMST:
# ifdef DEBUGL
mexPrintf("FDIMST\n");
# endif
tags_liste.push_back(make_pair(FDIMST, code));
tags_liste.emplace_back(FDIMST, code);
code += sizeof(FDIMST_);
break;
case FNUMEXPR:
# ifdef DEBUGL
mexPrintf("FNUMEXPR\n");
# endif
tags_liste.push_back(make_pair(FNUMEXPR, code));
tags_liste.emplace_back(FNUMEXPR, code);
code += sizeof(FNUMEXPR_);
break;
case FLDC:
# ifdef DEBUGL
mexPrintf("FLDC\n");
# endif
tags_liste.push_back(make_pair(FLDC, code));
tags_liste.emplace_back(FLDC, code);
code += sizeof(FLDC_);
break;
case FLDU:
# ifdef DEBUGL
mexPrintf("FLDU\n");
# endif
tags_liste.push_back(make_pair(FLDU, code));
tags_liste.emplace_back(FLDU, code);
code += sizeof(FLDU_);
break;
case FLDSU:
# ifdef DEBUGL
mexPrintf("FLDSU\n");
# endif
tags_liste.push_back(make_pair(FLDSU, code));
tags_liste.emplace_back(FLDSU, code);
code += sizeof(FLDSU_);
break;
case FLDR:
# ifdef DEBUGL
mexPrintf("FLDR\n");
# endif
tags_liste.push_back(make_pair(FLDR, code));
tags_liste.emplace_back(FLDR, code);
code += sizeof(FLDR_);
break;
case FLDT:
# ifdef DEBUGL
mexPrintf("FLDT\n");
# endif
tags_liste.push_back(make_pair(FLDT, code));
tags_liste.emplace_back(FLDT, code);
code += sizeof(FLDT_);
break;
case FLDST:
# ifdef DEBUGL
mexPrintf("FLDST\n");
# endif
tags_liste.push_back(make_pair(FLDST, code));
tags_liste.emplace_back(FLDST, code);
code += sizeof(FLDST_);
break;
case FSTPT:
# ifdef DEBUGL
mexPrintf("FSTPT = %d size = %d\n", FSTPT, sizeof(FSTPT_));
# endif
tags_liste.push_back(make_pair(FSTPT, code));
tags_liste.emplace_back(FSTPT, code);
code += sizeof(FSTPT_);
break;
case FSTPST:
# ifdef DEBUGL
mexPrintf("FSTPST\n");
# endif
tags_liste.push_back(make_pair(FSTPST, code));
tags_liste.emplace_back(FSTPST, code);
code += sizeof(FSTPST_);
break;
case FSTPR:
# ifdef DEBUGL
mexPrintf("FSTPR\n");
# endif
tags_liste.push_back(make_pair(FSTPR, code));
tags_liste.emplace_back(FSTPR, code);
code += sizeof(FSTPR_);
break;
case FSTPU:
# ifdef DEBUGL
mexPrintf("FSTPU\n");
# endif
tags_liste.push_back(make_pair(FSTPU, code));
tags_liste.emplace_back(FSTPU, code);
code += sizeof(FSTPU_);
break;
case FSTPSU:
# ifdef DEBUGL
mexPrintf("FSTPSU\n");
# endif
tags_liste.push_back(make_pair(FSTPSU, code));
tags_liste.emplace_back(FSTPSU, code);
code += sizeof(FSTPSU_);
break;
case FSTPG:
# ifdef DEBUGL
mexPrintf("FSTPG\n");
# endif
tags_liste.push_back(make_pair(FSTPG, code));
tags_liste.emplace_back(FSTPG, code);
code += sizeof(FSTPG_);
break;
case FSTPG2:
# ifdef DEBUGL
mexPrintf("FSTPG2\n");
# endif
tags_liste.push_back(make_pair(FSTPG2, code));
tags_liste.emplace_back(FSTPG2, code);
code += sizeof(FSTPG2_);
break;
case FSTPG3:
# ifdef DEBUGL
mexPrintf("FSTPG3\n");
# endif
tags_liste.push_back(make_pair(FSTPG3, code));
tags_liste.emplace_back(FSTPG3, code);
code += sizeof(FSTPG3_);
break;
case FUNARY:
# ifdef DEBUGL
mexPrintf("FUNARY\n");
# endif
tags_liste.push_back(make_pair(FUNARY, code));
tags_liste.emplace_back(FUNARY, code);
code += sizeof(FUNARY_);
break;
case FBINARY:
# ifdef DEBUGL
mexPrintf("FBINARY\n");
# endif
tags_liste.push_back(make_pair(FBINARY, code));
tags_liste.emplace_back(FBINARY, code);
code += sizeof(FBINARY_);
break;
case FTRINARY:
# ifdef DEBUGL
mexPrintf("FTRINARY\n");
# endif
tags_liste.push_back(make_pair(FTRINARY, code));
tags_liste.emplace_back(FTRINARY, code);
code += sizeof(FTRINARY_);
break;
case FOK:
# ifdef DEBUGL
mexPrintf("FOK\n");
# endif
tags_liste.push_back(make_pair(FOK, code));
tags_liste.emplace_back(FOK, code);
code += sizeof(FOK_);
break;
case FLDVS:
# ifdef DEBUGL
mexPrintf("FLDVS\n");
# endif
tags_liste.push_back(make_pair(FLDVS, code));
tags_liste.emplace_back(FLDVS, code);
code += sizeof(FLDVS_);
break;
case FLDSV:
# ifdef DEBUGL
mexPrintf("FLDSV\n");
# endif
tags_liste.push_back(make_pair(FLDSV, code));
tags_liste.emplace_back(FLDSV, code);
code += sizeof(FLDSV_);
break;
case FSTPSV:
# ifdef DEBUGL
mexPrintf("FSTPSV\n");
# endif
tags_liste.push_back(make_pair(FSTPSV, code));
tags_liste.emplace_back(FSTPSV, code);
code += sizeof(FSTPSV_);
break;
case FLDV:
# ifdef DEBUGL
mexPrintf("FLDV\n");
# endif
tags_liste.push_back(make_pair(FLDV, code));
tags_liste.emplace_back(FLDV, code);
code += sizeof(FLDV_);
break;
case FSTPV:
# ifdef DEBUGL
mexPrintf("FSTPV\n");
# endif
tags_liste.push_back(make_pair(FSTPV, code));
tags_liste.emplace_back(FSTPV, code);
code += sizeof(FSTPV_);
break;
case FBEGINBLOCK:
......@@ -1954,7 +1954,7 @@ public:
code = fbegin_block->load(code);
begin_block.push_back(tags_liste.size());
tags_liste.push_back(make_pair(FBEGINBLOCK, fbegin_block));
tags_liste.emplace_back(FBEGINBLOCK, fbegin_block));
nb_blocks++;
}
break;
......@@ -1962,14 +1962,14 @@ public:
# ifdef DEBUGL
mexPrintf("FJMPIFEVAL\n");
# endif
tags_liste.push_back(make_pair(FJMPIFEVAL, code));
tags_liste.emplace_back(FJMPIFEVAL, code);
code += sizeof(FJMPIFEVAL_);
break;
case FJMP:
# ifdef DEBUGL
mexPrintf("FJMP\n");
# endif
tags_liste.push_back(make_pair(FJMP, code));
tags_liste.emplace_back(FJMP, code);
code += sizeof(FJMP_);
break;
case FCALL:
......@@ -1981,7 +1981,7 @@ public:
code = fcall->load(code);
tags_liste.push_back(make_pair(FCALL, fcall));
tags_liste.emplace_back(FCALL, fcall));
# ifdef DEBUGL
mexPrintf("FCALL finish\n"); mexEvalString("drawnow;");
mexPrintf("-- *code=%d\n", *code); mexEvalString("drawnow;");
......@@ -1992,56 +1992,56 @@ public:
# ifdef DEBUGL
mexPrintf("FPUSH\n");
# endif
tags_liste.push_back(make_pair(FPUSH, code));
tags_liste.emplace_back(FPUSH, code);
code += sizeof(FPUSH_);
break;
case FPOP:
# ifdef DEBUGL
mexPrintf("FPOP\n");
# endif
tags_liste.push_back(make_pair(FPOP, code));
tags_liste.emplace_back(FPOP, code);
code += sizeof(FPOP_);
break;
case FLDTEF:
# ifdef DEBUGL
mexPrintf("FLDTEF\n");
# endif
tags_liste.push_back(make_pair(FLDTEF, code));
tags_liste.emplace_back(FLDTEF, code);
code += sizeof(FLDTEF_);
break;
case FSTPTEF:
# ifdef DEBUGL
mexPrintf("FSTPTEF\n");
# endif
tags_liste.push_back(make_pair(FSTPTEF, code));
tags_liste.emplace_back(FSTPTEF, code);
code += sizeof(FSTPTEF_);
break;
case FLDTEFD:
# ifdef DEBUGL
mexPrintf("FLDTEFD\n");
# endif
tags_liste.push_back(make_pair(FLDTEFD, code));
tags_liste.emplace_back(FLDTEFD, code);
code += sizeof(FLDTEFD_);
break;
case FSTPTEFD:
# ifdef DEBUGL
mexPrintf("FSTPTEFD\n");
# endif
tags_liste.push_back(make_pair(FSTPTEFD, code));
tags_liste.emplace_back(FSTPTEFD, code);
code += sizeof(FSTPTEFD_);
break;
case FLDTEFDD:
# ifdef DEBUGL
mexPrintf("FLDTEFDD\n");
# endif
tags_liste.push_back(make_pair(FLDTEFDD, code));
tags_liste.emplace_back(FLDTEFDD, code);
code += sizeof(FLDTEFDD_);
break;
case FSTPTEFDD:
# ifdef DEBUGL
mexPrintf("FSTPTEFDD\n");
# endif
tags_liste.push_back(make_pair(FSTPTEFDD, code));
tags_liste.emplace_back(FSTPTEFDD, code);
code += sizeof(FSTPTEFDD_);
break;
default:
......
......@@ -379,7 +379,7 @@ PacModelStatement::getPacModelInfoForPacExpectation(pair<string, pair<string, pa
int growth_symb_id = -1;
if (!growth.empty())
growth_symb_id = symbol_table.getID(growth);
pac_model_info = make_pair(name, make_pair(var_name, make_pair(discount, make_pair(growth_symb_id, undiff))));
pac_model_info = { name, { var_name, { discount, { growth_symb_id, undiff } } }};
}
VarModelStatement::VarModelStatement(SymbolList symbol_list_arg,
......@@ -407,7 +407,7 @@ VarModelStatement::getVarModelInfo(string &var_model_name,
else
{
auto it = options_list.num_options.find("var.order");
var_model_info[name] = make_pair(symbol_list, atoi(it->second.c_str()));
var_model_info[name] = { symbol_list, atoi(it->second.c_str()) };
}
}
......@@ -3134,7 +3134,7 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(OptionsList options_list_arg)
exit(EXIT_FAILURE);
}
if (restriction_map.find(make_pair(from_regime, to_regime)) !=
if (restriction_map.find({ from_regime, to_regime }) !=
restriction_map.end())
{
cerr << "ERROR: two restrictions were given for: " << from_regime << ", "
......@@ -3149,7 +3149,7 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(OptionsList options_list_arg)
<< " must be less than 1" << endl;
exit(EXIT_FAILURE);
}
restriction_map[make_pair(from_regime, to_regime)] = transition_probability;
restriction_map[{ from_regime, to_regime }] = transition_probability;
}
catch (const bad_lexical_cast &)
{
......@@ -3189,10 +3189,10 @@ MarkovSwitchingStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo
vector<bool> all_restrictions_in_col(num_regimes, true);
for (int row = 0; row < num_regimes; row++)
for (int col = 0; col < num_regimes; col++)
if (restriction_map.find(make_pair(row+1, col+1)) != restriction_map.end())
if (restriction_map.find({ row+1, col+1 }) != restriction_map.end())
{
row_trans_prob_sum[row] += restriction_map[make_pair(row+1, col+1)];
col_trans_prob_sum[col] += restriction_map[make_pair(row+1, col+1)];
row_trans_prob_sum[row] += restriction_map[{ row+1, col+1 }];
col_trans_prob_sum[col] += restriction_map[{ row+1, col+1 }];
}
else
{
......
......@@ -65,7 +65,7 @@ DataTree::AddNonNegativeConstant(const string &value)
VariableNode *
DataTree::AddVariableInternal(int symb_id, int lag)
{
auto it = variable_node_map.find(make_pair(symb_id, lag));
auto it = variable_node_map.find({ symb_id, lag });
if (it != variable_node_map.end())
return it->second;
else
......@@ -506,7 +506,7 @@ DataTree::AddVarExpectation(const int symb_id, const int forecast_horizon, const
{
assert(symbol_table.getType(symb_id) == eEndogenous);
auto it = var_expectation_node_map.find(make_pair(model_name, make_pair(symb_id, forecast_horizon)));
auto it = var_expectation_node_map.find({ model_name, { symb_id, forecast_horizon } });
if (it != var_expectation_node_map.end())
return it->second;
......@@ -548,7 +548,7 @@ DataTree::AddExternalFunction(int symb_id, const vector<expr_t> &arguments)
{
assert(symbol_table.getType(symb_id) == eExternalFunction);
auto it = external_function_node_map.find(make_pair(arguments, symb_id));
auto it = external_function_node_map.find({ arguments, symb_id });
if (it != external_function_node_map.end())
return it->second;
......@@ -561,8 +561,7 @@ DataTree::AddFirstDerivExternalFunction(int top_level_symb_id, const vector<expr
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
auto it
= first_deriv_external_function_node_map.find(make_pair(make_pair(arguments, input_index),
top_level_symb_id));
= first_deriv_external_function_node_map.find({ { arguments, input_index }, top_level_symb_id });
if (it != first_deriv_external_function_node_map.end())
return it->second;
......@@ -575,9 +574,8 @@ DataTree::AddSecondDerivExternalFunction(int top_level_symb_id, const vector<exp
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
auto it
= second_deriv_external_function_node_map.find(make_pair(make_pair(arguments,
make_pair(input_index1, input_index2)),
top_level_symb_id));
= second_deriv_external_function_node_map.find({ { arguments, { input_index1, input_index2 } },
top_level_symb_id });
if (it != second_deriv_external_function_node_map.end())
return it->second;
......
......@@ -330,7 +330,7 @@ inline expr_t
DataTree::AddUnaryOp(UnaryOpcode op_code, expr_t arg, int arg_exp_info_set, int param1_symb_id, int param2_symb_id, const string &adl_param_name, const vector<int> &adl_lags)
{
// If the node already exists in tree, share it
auto it = unary_op_node_map.find(make_pair(make_pair(arg, op_code), make_pair(make_pair(arg_exp_info_set, make_pair(param1_symb_id, param2_symb_id)), make_pair(adl_param_name, adl_lags))));
auto it = unary_op_node_map.find({ { arg, op_code }, { { arg_exp_info_set, { param1_symb_id, param2_symb_id } }, { adl_param_name, adl_lags } } });
if (it != unary_op_node_map.end())
return it->second;
......@@ -355,7 +355,7 @@ DataTree::AddUnaryOp(UnaryOpcode op_code, expr_t arg, int arg_exp_info_set, int
inline expr_t
DataTree::AddBinaryOp(expr_t arg1, BinaryOpcode op_code, expr_t arg2, int powerDerivOrder)
{
auto it = binary_op_node_map.find(make_pair(make_pair(make_pair(arg1, arg2), powerDerivOrder), op_code));
auto it = binary_op_node_map.find({ { { arg1, arg2 }, powerDerivOrder }, op_code });
if (it != binary_op_node_map.end())
return it->second;
......@@ -376,7 +376,7 @@ DataTree::AddBinaryOp(expr_t arg1, BinaryOpcode op_code, expr_t arg2, int powerD
inline expr_t
DataTree::AddTrinaryOp(expr_t arg1, TrinaryOpcode op_code, expr_t arg2, expr_t arg3)
{
auto it = trinary_op_node_map.find(make_pair(make_pair(make_pair(arg1, arg2), arg3), op_code));
auto it = trinary_op_node_map.find({ { { arg1, arg2 }, arg3 }, op_code });
if (it != trinary_op_node_map.end())
return it->second;
......
This diff is collapsed.
This diff is collapsed.
......@@ -399,9 +399,7 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
vms->fillVarModelInfoFromEquations(eqnumber, lhs, rhs, nonstationary,
diff, orig_diff_var, max_lag);
var_model_info_pac_expectation[var_model_name] =
make_pair(make_pair(make_pair(lhs, lhs_expr_t),
make_pair(diff, orig_diff_var)),
make_pair(make_pair(max_lag, nonstationary), eqnumber));
{ { { lhs, lhs_expr_t }, { diff, orig_diff_var } }, { { max_lag, nonstationary }, eqnumber } };
}
auto *pms = dynamic_cast<PacModelStatement *>(*it);
if (pms != nullptr)
......
......@@ -166,7 +166,7 @@ ModelTree::computeNonSingularNormalization(jacob_map_t &contemporaneous_jacobian
int suppress = 0;
for (auto & iter : normalized_contemporaneous_jacobian)
if (fabs(iter.second) > max(current_cutoff, cutoff))
tmp_normalized_contemporaneous_jacobian[make_pair(iter.first.first, iter.first.second)] = iter.second;
tmp_normalized_contemporaneous_jacobian[{ iter.first.first, iter.first.second }] = iter.second;
else
suppress++;
......@@ -193,7 +193,7 @@ ModelTree::computeNonSingularNormalization(jacob_map_t &contemporaneous_jacobian
endo.clear();
equations[i]->collectEndogenous(endo);
for (const auto & it : endo)
tmp_normalized_contemporaneous_jacobian[make_pair(i, it.first)] = 1;
tmp_normalized_contemporaneous_jacobian[{ i, it.first }] = 1;
}
check = computeNormalization(tmp_normalized_contemporaneous_jacobian, true);
if (check)
......@@ -201,16 +201,16 @@ ModelTree::computeNonSingularNormalization(jacob_map_t &contemporaneous_jacobian
// Update the jacobian matrix
for (jacob_map_t::const_iterator it = tmp_normalized_contemporaneous_jacobian.begin(); it != tmp_normalized_contemporaneous_jacobian.end(); it++)
{
if (static_jacobian.find(make_pair(it->first.first, it->first.second)) == static_jacobian.end())
static_jacobian[make_pair(it->first.first, it->first.second)] = 0;
if (dynamic_jacobian.find(make_pair(0, make_pair(it->first.first, it->first.second))) == dynamic_jacobian.end())
dynamic_jacobian[make_pair(0, make_pair(it->first.first, it->first.second))] = nullptr;
if (contemporaneous_jacobian.find(make_pair(it->first.first, it->first.second)) == contemporaneous_jacobian.end())
contemporaneous_jacobian[make_pair(it->first.first, it->first.second)] = 0;
if (static_jacobian.find({ it->first.first, it->first.second }) == static_jacobian.end())
static_jacobian[{ it->first.first, it->first.second }] = 0;
if (dynamic_jacobian.find({ 0, { it->first.first, it->first.second } }) == dynamic_jacobian.end())
dynamic_jacobian[{ 0, { it->first.first, it->first.second } }] = nullptr;
if (contemporaneous_jacobian.find({ it->first.first, it->first.second }) == contemporaneous_jacobian.end())
contemporaneous_jacobian[{ it->first.first, it->first.second }] = 0;
try
{
if (first_derivatives.find(make_pair(it->first.first, getDerivID(symbol_table.getID(eEndogenous, it->first.second), 0))) == first_derivatives.end())
first_derivatives[make_pair(it->first.first, getDerivID(symbol_table.getID(eEndogenous, it->first.second), 0))] = Zero;
if (first_derivatives.find({ it->first.first, getDerivID(symbol_table.getID(eEndogenous, it->first.second), 0) }) == first_derivatives.end())
first_derivatives[{ it->first.first, getDerivID(symbol_table.getID(eEndogenous, it->first.second), 0) }] = Zero;
}
catch (DataTree::UnknownDerivIDException &e)
{
......@@ -244,10 +244,10 @@ ModelTree::computeNormalizedEquations(multimap<int, int> &endo2eqs) const
set<pair<int, int>> endo;
equations[i]->get_arg2()->collectEndogenous(endo);
if (endo.find(make_pair(symbol_table.getTypeSpecificID(symb_id), 0)) != endo.end())
if (endo.find({ symbol_table.getTypeSpecificID(symb_id), 0 }) != endo.end())
continue;
endo2eqs.insert(make_pair(symbol_table.getTypeSpecificID(symb_id), (int) i));
endo2eqs.emplace(symbol_table.getTypeSpecificID(symb_id), (int) i);
cout << "Endogenous " << symbol_table.getName(symb_id) << " normalized in equation " << (i+1) << endl;
}
}
......@@ -288,20 +288,20 @@ 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(make_pair(eq, deriv_id));
jacobian_elements_to_delete.emplace(eq, deriv_id);
}
else
{
if (lag == 0)
{
nb_elements_contemparenous_Jacobian++;
contemporaneous_jacobian[make_pair(eq, var)] = val;
contemporaneous_jacobian[{ eq, var }] = val;
}
if (static_jacobian.find(make_pair(eq, var)) != static_jacobian.end())
static_jacobian[make_pair(eq, var)] += val;
if (static_jacobian.find({ eq, var }) != static_jacobian.end())
static_jacobian[{ eq, var }] += val;
else
static_jacobian[make_pair(eq, var)] = val;
dynamic_jacobian[make_pair(lag, make_pair(eq, var))] = Id;
static_jacobian[{ eq, var }] = val;
dynamic_jacobian[{ lag, { eq, var } }] = Id;
}
}
}
......@@ -450,13 +450,13 @@ ModelTree::equationTypeDetermination(const map<pair<int, pair<int, int>>, expr_t
eq_node = equations[eq];
lhs = eq_node->get_arg1();
Equation_Simulation_Type = E_SOLVE;
auto derivative = first_order_endo_derivatives.find(make_pair(eq, make_pair(var, 0)));
auto derivative = first_order_endo_derivatives.find({ eq, { var, 0 } });
pair<bool, expr_t> res;
if (derivative != first_order_endo_derivatives.end())
{
set<pair<int, int>> result;
derivative->second->collectEndogenous(result);
auto d_endo_variable = result.find(make_pair(var, 0));
auto d_endo_variable = result.find({ var, 0 });
//Determine whether the equation could be evaluated rather than to be solved
if (lhs->isVariableNodeEqualTo(eEndogenous, Index_Var_IM[i], 0) && derivative->second->isNumConstNodeEqualTo(1))
{
......@@ -478,7 +478,7 @@ ModelTree::equationTypeDetermination(const map<pair<int, pair<int, int>>, expr_t
}
}
}
V_Equation_Simulation_Type[eq] = make_pair(Equation_Simulation_Type, dynamic_cast<BinaryOpNode *>(res.second));