Commit 182c5327 authored by Sébastien Villemot's avatar Sébastien Villemot

Remove useless spaces in type qualifiers

In C++11, it is no longer necessary to put a space between two consecutive ">".
parent f8cc3ae3
......@@ -1677,7 +1677,7 @@ public:
};
#ifdef BYTE_CODE
typedef vector<pair<Tags, void * > > tags_liste_t;
typedef vector<pair<Tags, void * >> tags_liste_t;
class CodeLoad
{
private:
......
......@@ -374,7 +374,7 @@ PacModelStatement::writeJsonOutput(ostream &output) const
}
void
PacModelStatement::getPacModelInfoForPacExpectation(pair<string, pair<string, pair<string, pair<int, map<string, int> > > > > &pac_model_info) const
PacModelStatement::getPacModelInfoForPacExpectation(pair<string, pair<string, pair<string, pair<int, map<string, int>>>>> &pac_model_info) const
{
int growth_symb_id = -1;
if (!growth.empty())
......@@ -395,8 +395,8 @@ VarModelStatement::VarModelStatement(SymbolList symbol_list_arg,
void
VarModelStatement::getVarModelInfo(string &var_model_name,
map<string, pair<SymbolList, int> > &var_model_info,
map<string, vector<string> > &var_model_eqtags) const
map<string, pair<SymbolList, int>> &var_model_info,
map<string, vector<string>> &var_model_eqtags) const
{
var_model_name = name;
if (symbol_list.empty())
......@@ -413,7 +413,7 @@ VarModelStatement::getVarModelInfo(string &var_model_name,
void
VarModelStatement::fillVarModelInfoFromEquations(vector<int> &eqnumber_arg, vector<int> &lhs_arg,
vector<set<pair<int, int> > > &rhs_arg,
vector<set<pair<int, int>>> &rhs_arg,
vector<bool> &nonstationary_arg,
vector<bool> &diff_arg,
vector<int> &orig_diff_var_arg,
......@@ -524,7 +524,7 @@ VarModelStatement::writeOutput(ostream &output, const string &basename, bool min
}
void
VarModelStatement::createVarModelMFunction(ostream &output, const map<string, set<int> > &var_expectation_functions_to_write) const
VarModelStatement::createVarModelMFunction(ostream &output, const map<string, set<int>> &var_expectation_functions_to_write) const
{
if (var_expectation_functions_to_write.find(name) == var_expectation_functions_to_write.end())
return;
......@@ -571,12 +571,12 @@ VarEstimationStatement::writeOutput(ostream &output, const string &basename, boo
}
VarRestrictionsStatement::VarRestrictionsStatement(const string &var_model_name_arg,
const map<string, vector<string> > &var_map_arg,
map<int, map<int, SymbolList> > exclusion_restrictions_arg,
const map<string, vector<string>> &var_map_arg,
map<int, map<int, SymbolList>> exclusion_restrictions_arg,
equation_restrictions_t equation_restrictions_arg,
crossequation_restrictions_t crossequation_restrictions_arg,
map<pair<int, int>, double> covariance_number_restriction_arg,
map<pair<int, int>, pair<int, int> > covariance_pair_restriction_arg,
map<pair<int, int>, pair<int, int>> covariance_pair_restriction_arg,
const SymbolTable &symbol_table_arg) :
var_model_name(var_model_name_arg),
var_map(var_map_arg),
......@@ -1472,7 +1472,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo
// Check that no parameter/endogenous is declared twice in the block
set<string> already_declared;
set<pair<string, string> > already_declared_corr;
set<pair<string, string>> already_declared_corr;
for (const auto & it : estim_params_list)
{
if (it.type == 3) // Correlation
......@@ -4950,7 +4950,7 @@ SMMEstimationStatement::writeJsonOutput(ostream &output) const
GenerateIRFsStatement::GenerateIRFsStatement(OptionsList options_list_arg,
vector<string> generate_irf_names_arg,
vector<map<string, double> > generate_irf_elements_arg) :
vector<map<string, double>> generate_irf_elements_arg) :
options_list(move(options_list_arg)),
generate_irf_names(move(generate_irf_names_arg)),
generate_irf_elements(move(generate_irf_elements_arg))
......
......@@ -140,7 +140,7 @@ public:
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void writeJsonOutput(ostream &output) const override;
void fillUndiffedLHS(vector<int> &lhs);
void getPacModelInfoForPacExpectation(pair<string, pair<string, pair<string, pair<int, map<string, int> > > > > &pac_model_info) const;
void getPacModelInfoForPacExpectation(pair<string, pair<string, pair<string, pair<int, map<string, int>>>>> &pac_model_info) const;
};
class VarModelStatement : public Statement
......@@ -151,7 +151,7 @@ private:
const string &name;
const SymbolTable &symbol_table;
vector<int> eqnumber, lhs, orig_diff_var;
vector<set<pair<int, int> > > rhs_by_eq; // rhs by equation
vector<set<pair<int, int>>> rhs_by_eq; // rhs by equation
vector<bool> nonstationary, diff;
int max_lag;
public:
......@@ -160,41 +160,41 @@ public:
const string &name_arg,
const SymbolTable &symbol_table_arg);
void getVarModelInfo(string &var_model_name,
map<string, pair<SymbolList, int> > &var_model_info,
map<string, vector<string> > &var_model_eqtags) const;
map<string, pair<SymbolList, int>> &var_model_info,
map<string, vector<string>> &var_model_eqtags) const;
void fillVarModelInfoFromEquations(vector<int> &eqnumber_arg, vector<int> &lhs_arg,
vector<set<pair<int, int> > > &rhs_arg,
vector<set<pair<int, int>>> &rhs_arg,
vector<bool> &nonstationary_arg,
vector<bool> &diff_arg, vector<int> &orig_diff_var_arg,
int max_lag_arg);
void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void createVarModelMFunction(ostream &output, const map<string, set<int> > &var_expectation_functions_to_write) const;
void createVarModelMFunction(ostream &output, const map<string, set<int>> &var_expectation_functions_to_write) const;
};
class VarRestrictionsStatement : public Statement
{
private:
typedef pair<pair<int, pair<int, int> >, expr_t> var_restriction_eq_crosseq_t;
typedef pair<pair<int, pair<int, int>>, expr_t> var_restriction_eq_crosseq_t;
const string &var_model_name;
const map<string, vector<string> > &var_map;
const map<int, map<int, SymbolList> > exclusion_restrictions;
typedef map<int, pair<pair<var_restriction_eq_crosseq_t, var_restriction_eq_crosseq_t>, double> > equation_restrictions_t;
const map<string, vector<string>> &var_map;
const map<int, map<int, SymbolList>> exclusion_restrictions;
typedef map<int, pair<pair<var_restriction_eq_crosseq_t, var_restriction_eq_crosseq_t>, double>> equation_restrictions_t;
const equation_restrictions_t equation_restrictions;
typedef vector<pair<pair<var_restriction_eq_crosseq_t, var_restriction_eq_crosseq_t>, double> > crossequation_restrictions_t;
typedef vector<pair<pair<var_restriction_eq_crosseq_t, var_restriction_eq_crosseq_t>, double>> crossequation_restrictions_t;
const crossequation_restrictions_t crossequation_restrictions;
const map<pair<int, int>, double> covariance_number_restriction;
const map<pair<int, int>, pair<int, int> > covariance_pair_restriction;
const map<pair<int, int>, pair<int, int>> covariance_pair_restriction;
const SymbolTable &symbol_table;
int findIdxInVector(const vector<string> &vecvars, const string &var) const;
public:
VarRestrictionsStatement(const string &var_model_name_arg,
const map<string, vector<string> > &var_map_arg,
map<int, map<int, SymbolList> > exclusion_restrictions_arg,
const map<string, vector<string>> &var_map_arg,
map<int, map<int, SymbolList>> exclusion_restrictions_arg,
equation_restrictions_t equation_restrictions_arg,
crossequation_restrictions_t crossequation_restrictions_arg,
map<pair<int, int>, double> covariance_number_restriction_arg,
map<pair<int, int>, pair<int, int> > covariance_pair_restriction_arg,
map<pair<int, int>, pair<int, int>> covariance_pair_restriction_arg,
const SymbolTable &symbol_table_arg);
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
};
......@@ -437,7 +437,7 @@ public:
class ModelComparisonStatement : public Statement
{
public:
typedef vector<pair<string, string> > filename_list_t;
typedef vector<pair<string, string>> filename_list_t;
private:
filename_list_t filename_list;
OptionsList options_list;
......@@ -820,7 +820,7 @@ public:
class SvarIdentificationStatement : public Statement
{
public:
// typedef map<pair<int, int>, vector<int> > svar_identification_exclusion_t;
// typedef map<pair<int, int>, vector<int>> svar_identification_exclusion_t;
struct svar_identification_restriction
{
int equation;
......@@ -906,7 +906,7 @@ class SubsamplesStatement : public Statement
{
public:
//! Storage for declaring subsamples: map<subsample_name, <date1, date2 >
typedef map<string, pair<string, string> > subsample_declaration_map_t;
typedef map<string, pair<string, string>> subsample_declaration_map_t;
private:
const string name1;
const string name2;
......@@ -1203,11 +1203,11 @@ public:
private:
const OptionsList options_list;
const vector<string> generate_irf_names;
const vector<map<string, double> > generate_irf_elements;
const vector<map<string, double>> generate_irf_elements;
public:
GenerateIRFsStatement(OptionsList options_list_arg,
vector<string> generate_irf_names_arg,
vector<map<string, double> > generate_irf_elements_arg);
vector<map<string, double>> generate_irf_elements_arg);
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void writeJsonOutput(ostream &output) const override;
};
......
......@@ -367,10 +367,10 @@ ConfigFile::getConfigFileInfo(const string &config_file)
else if (!tokenizedLine.front().compare("Members"))
{
char_separator<char> sep(" ,;", "()", drop_empty_tokens);
tokenizer<char_separator<char> > tokens(tokenizedLine.back(), sep);
tokenizer<char_separator<char>> tokens(tokenizedLine.back(), sep);
bool begin_weight = false;
string node_name;
for (tokenizer<char_separator<char> >::iterator it = tokens.begin();
for (tokenizer<char_separator<char>>::iterator it = tokens.begin();
it != tokens.end(); it++)
{
string token(*it);
......@@ -683,8 +683,8 @@ ConfigFile::getIncludePaths() const
vector<string> include_paths;
for (auto path : paths)
{
map <string, vector<string> > pathmap = path->get_paths();
for (map <string, vector<string> >::const_iterator mapit = pathmap.begin(); mapit != pathmap.end(); mapit++)
map <string, vector<string>> pathmap = path->get_paths();
for (map <string, vector<string>>::const_iterator mapit = pathmap.begin(); mapit != pathmap.end(); mapit++)
for (const auto & vecit : mapit->second)
include_paths.push_back(vecit);
}
......
......@@ -50,9 +50,9 @@ public:
Path(vector<string> &includepath_arg);
~Path();
private:
map<string, vector<string> > paths;
map<string, vector<string>> paths;
public:
inline map<string, vector<string> >
inline map<string, vector<string>>
get_paths()
{
return paths;
......
......@@ -66,7 +66,7 @@ protected:
variable_node_map_t variable_node_map;
//! Pair( Pair(arg1, UnaryOpCode), Pair( Expectation Info Set, Pair(param1_symb_id, param2_symb_id)) ))
typedef map<pair<pair<expr_t, UnaryOpcode>, pair<pair<int, pair<int, int> >, pair<string, vector<int> > > >, UnaryOpNode *> unary_op_node_map_t;
typedef map<pair<pair<expr_t, UnaryOpcode>, pair<pair<int, pair<int, int>>, pair<string, vector<int>>>>, UnaryOpNode *> unary_op_node_map_t;
unary_op_node_map_t unary_op_node_map;
//! Pair( Pair( Pair(arg1, arg2), order of Power Derivative), opCode)
typedef map<pair<pair<pair<expr_t, expr_t>, int>, BinaryOpcode>, BinaryOpNode *> binary_op_node_map_t;
......@@ -79,7 +79,7 @@ protected:
external_function_node_map_t external_function_node_map;
// (model_name, (symb_id, forecast_horizon)) -> VarExpectationNode
typedef map<pair<string, pair<int, int> >, VarExpectationNode *> var_expectation_node_map_t;
typedef map<pair<string, pair<int, int>>, VarExpectationNode *> var_expectation_node_map_t;
var_expectation_node_map_t var_expectation_node_map;
// model_name -> PacExpectationNode
......@@ -91,7 +91,7 @@ protected:
first_deriv_external_function_node_map_t first_deriv_external_function_node_map;
// ((arguments, (deriv_idx1, deriv_idx2)), symb_id) -> SecondDerivExternalFunctionNode
typedef map<pair<pair<vector<expr_t>, pair<int, int> >, int>, SecondDerivExternalFunctionNode *> second_deriv_external_function_node_map_t;
typedef map<pair<pair<vector<expr_t>, pair<int, int>>, int>, SecondDerivExternalFunctionNode *> second_deriv_external_function_node_map_t;
second_deriv_external_function_node_map_t second_deriv_external_function_node_map;
//! Stores local variables value (maps symbol ID to corresponding node)
......
......@@ -88,7 +88,7 @@ DynamicModel::compileChainRuleDerivative(ofstream &code_file, unsigned int &inst
void
DynamicModel::computeTemporaryTermsOrdered()
{
map<expr_t, pair<int, int> > first_occurence;
map<expr_t, pair<int, int>> first_occurence;
map<expr_t, int> reference_count;
BinaryOpNode *eq_node;
first_derivatives_t::const_iterator it;
......@@ -98,7 +98,7 @@ DynamicModel::computeTemporaryTermsOrdered()
map_idx.clear();
unsigned int nb_blocks = getNbBlocks();
v_temporary_terms = vector<vector<temporary_terms_t> >(nb_blocks);
v_temporary_terms = vector<vector<temporary_terms_t>>(nb_blocks);
v_temporary_terms_inuse = vector<temporary_terms_inuse_t>(nb_blocks);
temporary_terms.clear();
......@@ -254,13 +254,13 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
int prev_lag;
unsigned int prev_var, count_col, count_col_endo, count_col_exo, count_col_exo_det, count_col_other_endo;
map<pair<int, pair<int, int> >, expr_t> tmp_block_endo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_block_endo_derivative;
for (auto it = blocks_derivatives[block].begin(); it != (blocks_derivatives[block]).end(); it++)
tmp_block_endo_derivative[make_pair(it->second.first, make_pair(it->first.second, it->first.first))] = it->second.second;
prev_var = 999999999;
prev_lag = -9999999;
count_col_endo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -271,13 +271,13 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
count_col_endo++;
}
}
map<pair<int, pair<int, int> >, expr_t> tmp_block_exo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_block_exo_derivative;
for (auto it = derivative_exo[block].begin(); it != (derivative_exo[block]).end(); it++)
tmp_block_exo_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
prev_var = 999999999;
prev_lag = -9999999;
count_col_exo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -288,13 +288,13 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
count_col_exo++;
}
}
map<pair<int, pair<int, int> >, expr_t> tmp_block_exo_det_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_block_exo_det_derivative;
for (auto it = derivative_exo_det[block].begin(); it != (derivative_exo_det[block]).end(); it++)
tmp_block_exo_det_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
prev_var = 999999999;
prev_lag = -9999999;
count_col_exo_det = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -305,13 +305,13 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
count_col_exo_det++;
}
}
map<pair<int, pair<int, int> >, expr_t> tmp_block_other_endo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_block_other_endo_derivative;
for (auto it = derivative_other_endo[block].begin(); it != (derivative_other_endo[block]).end(); it++)
tmp_block_other_endo_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
prev_var = 999999999;
prev_lag = -9999999;
count_col_other_endo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_other_endo_derivative.begin(); it != tmp_block_other_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_other_endo_derivative.begin(); it != tmp_block_other_endo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -564,7 +564,7 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
prev_var = 999999999;
prev_lag = -9999999;
count_col = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -590,7 +590,7 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
prev_var = 999999999;
prev_lag = -9999999;
count_col = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_exo_derivative.begin(); it != tmp_block_exo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -613,7 +613,7 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
prev_var = 999999999;
prev_lag = -9999999;
count_col = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_exo_det_derivative.begin(); it != tmp_block_exo_det_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_exo_det_derivative.begin(); it != tmp_block_exo_det_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -636,7 +636,7 @@ DynamicModel::writeModelEquationsOrdered_M(const string &dynamic_basename) const
prev_var = 999999999;
prev_lag = -9999999;
count_col = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_other_endo_derivative.begin(); it != tmp_block_other_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_other_endo_derivative.begin(); it != tmp_block_other_endo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int var = it->first.second.first;
......@@ -830,8 +830,8 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
for (int i = 0; i < symbol_table.exo_nbr(); i++)
exo.push_back(i);
map<pair< int, pair<int, int> >, expr_t> first_derivatives_reordered_endo;
map<pair< pair<int, int>, pair<int, int> >, expr_t> first_derivatives_reordered_exo;
map<pair< int, pair<int, int>>, expr_t> first_derivatives_reordered_endo;
map<pair< pair<int, int>, pair<int, int>>, expr_t> first_derivatives_reordered_exo;
for (const auto & first_derivative : first_derivatives)
{
int deriv_id = first_derivative.first.second;
......@@ -847,7 +847,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
int prev_var = -1;
int prev_lag = -999999999;
int count_col_endo = 0;
for (map<pair< int, pair<int, int> >, expr_t>::const_iterator it = first_derivatives_reordered_endo.begin();
for (map<pair< int, pair<int, int>>, expr_t>::const_iterator it = first_derivatives_reordered_endo.begin();
it != first_derivatives_reordered_endo.end(); it++)
{
int var = it->first.second.first;
......@@ -865,7 +865,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
int count_col_exo = 0;
int count_col_det_exo = 0;
for (map<pair< pair<int, int>, pair<int, int> >, expr_t>::const_iterator it = first_derivatives_reordered_exo.begin();
for (map<pair< pair<int, int>, pair<int, int>>, expr_t>::const_iterator it = first_derivatives_reordered_exo.begin();
it != first_derivatives_reordered_exo.end(); it++)
{
int var = it->first.second.first;
......@@ -920,7 +920,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
fjmp_if_eval.write(code_file, instruction_number);
int prev_instruction_number = instruction_number;
vector<vector<pair<pair<int, int>, int > > > derivatives;
vector<vector<pair<pair<int, int>, int >>> derivatives;
derivatives.resize(symbol_table.endo_nbr());
count_u = symbol_table.endo_nbr();
for (const auto & first_derivative : first_derivatives)
......@@ -951,7 +951,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
fldr.write(code_file, instruction_number);
if (derivatives[i].size())
{
for (vector<pair<pair<int, int>, int> >::const_iterator it = derivatives[i].begin();
for (vector<pair<pair<int, int>, int>>::const_iterator it = derivatives[i].begin();
it != derivatives[i].end(); it++)
{
FLDU_ fldu(it->second);
......@@ -989,7 +989,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
prev_var = -1;
prev_lag = -999999999;
count_col_endo = 0;
for (map<pair< int, pair<int, int> >, expr_t>::const_iterator it = first_derivatives_reordered_endo.begin();
for (map<pair< int, pair<int, int>>, expr_t>::const_iterator it = first_derivatives_reordered_endo.begin();
it != first_derivatives_reordered_endo.end(); it++)
{
unsigned int eq = it->first.second.second;
......@@ -1011,7 +1011,7 @@ DynamicModel::writeModelEquationsCode(string &file_name, const string &bin_basen
prev_var = -1;
prev_lag = -999999999;
count_col_exo = 0;
for (map<pair< pair<int, int>, pair<int, int> >, expr_t>::const_iterator it = first_derivatives_reordered_exo.begin();
for (map<pair< pair<int, int>, pair<int, int>>, expr_t>::const_iterator it = first_derivatives_reordered_exo.begin();
it != first_derivatives_reordered_exo.end(); it++)
{
unsigned int eq = it->first.second.second;
......@@ -1108,22 +1108,22 @@ DynamicModel::writeModelEquationsCode_Block(string &file_name, const string &bin
simulation_type == SOLVE_TWO_BOUNDARIES_COMPLETE || simulation_type == SOLVE_TWO_BOUNDARIES_SIMPLE);
file_open = true;
}
map<pair<int, pair<int, int> >, expr_t> tmp_block_endo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_block_endo_derivative;
for (auto it = blocks_derivatives[block].begin(); it != (blocks_derivatives[block]).end(); it++)
tmp_block_endo_derivative[make_pair(it->second.first, make_pair(it->first.second, it->first.first))] = it->second.second;
map<pair<int, pair<int, int> >, expr_t> tmp_exo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_exo_derivative;
for (auto it = derivative_exo[block].begin(); it != (derivative_exo[block]).end(); it++)
tmp_exo_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
map<pair<int, pair<int, int> >, expr_t> tmp_exo_det_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_exo_det_derivative;
for (auto it = derivative_exo_det[block].begin(); it != (derivative_exo_det[block]).end(); it++)
tmp_exo_det_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
map<pair<int, pair<int, int> >, expr_t> tmp_other_endo_derivative;
map<pair<int, pair<int, int>>, expr_t> tmp_other_endo_derivative;
for (auto it = derivative_other_endo[block].begin(); it != (derivative_other_endo[block]).end(); it++)
tmp_other_endo_derivative[make_pair(it->first.first, make_pair(it->first.second.second, it->first.second.first))] = it->second;
int prev_var = -1;
int prev_lag = -999999999;
int count_col_endo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
{
int lag = it->first.first;
int var = it->first.second.first;
......@@ -1408,7 +1408,7 @@ DynamicModel::writeModelEquationsCode_Block(string &file_name, const string &bin
prev_var = -1;
prev_lag = -999999999;
count_col_endo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_block_endo_derivative.begin(); it != tmp_block_endo_derivative.end(); it++)
{
int lag = it->first.first;
unsigned int eq = it->first.second.second;
......@@ -1430,7 +1430,7 @@ DynamicModel::writeModelEquationsCode_Block(string &file_name, const string &bin
prev_var = -1;
prev_lag = -999999999;
count_col_exo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_exo_derivative.begin(); it != tmp_exo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_exo_derivative.begin(); it != tmp_exo_derivative.end(); it++)
{
int lag = it->first.first;
int eq = it->first.second.second;
......@@ -1454,7 +1454,7 @@ DynamicModel::writeModelEquationsCode_Block(string &file_name, const string &bin
prev_var = -1;
prev_lag = -999999999;
int count_col_exo_det = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_exo_det_derivative.begin(); it != tmp_exo_det_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_exo_det_derivative.begin(); it != tmp_exo_det_derivative.end(); it++)
{
int lag = it->first.first;
int eq = it->first.second.second;
......@@ -1478,7 +1478,7 @@ DynamicModel::writeModelEquationsCode_Block(string &file_name, const string &bin
prev_var = -1;
prev_lag = -999999999;
count_col_other_endo = 0;
for (map<pair<int, pair<int, int> >, expr_t>::const_iterator it = tmp_other_endo_derivative.begin(); it != tmp_other_endo_derivative.end(); it++)
for (map<pair<int, pair<int, int>>, expr_t>::const_iterator it = tmp_other_endo_derivative.begin(); it != tmp_other_endo_derivative.end(); it++)
{
int lag = it->first.first;
int eq = it->first.second.second;
......@@ -1528,7 +1528,7 @@ DynamicModel::fillVarExpectationFunctionsToWrite()
var_expectation_functions_to_write[it->first.first].insert(it->first.second.second);
}
map<string, set<int> >
map<string, set<int>>
DynamicModel::getVarExpectationFunctionsToWrite() const
{
return var_expectation_functions_to_write;
......@@ -3233,7 +3233,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
for (vector<int>::const_iterator it = state_var.begin(); it != state_var.end(); it++)
state_equ.push_back(equation_reordered[variable_inv_reordered[*it - 1]]+1);
map<pair< int, pair<int, int> >, int> lag_row_incidence;
map<pair< int, pair<int, int>>, int> lag_row_incidence;
for (const auto & first_derivative : first_derivatives)
{
int deriv_id = first_derivative.first.second;
......@@ -3247,7 +3247,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
}
}
int prev_lag = -1000000;
for (map<pair< int, pair<int, int> >, int>::const_iterator it = lag_row_incidence.begin(); it != lag_row_incidence.end(); it++)
for (map<pair< int, pair<int, int>>, int>::const_iterator it = lag_row_incidence.begin(); it != lag_row_incidence.end(); it++)
{
if (prev_lag != it->first.first)
{
......@@ -3296,7 +3296,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
}
if (block == 0)
{
set<pair<int, int> > row_state_var_incidence;
set<pair<int, int>> row_state_var_incidence;
for (auto it = blocks_derivatives[block].begin(); it != (blocks_derivatives[block]).end(); it++)
{
vector<int>::const_iterator it_state_var = find(state_var.begin(), state_var.end(), getBlockVariableID(block, it->first.second)+1);
......@@ -3334,7 +3334,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
}
}
set<pair<int, int> > col_state_var_incidence;
set<pair<int, int>> col_state_var_incidence;
for (const auto & row_state_var_incidence_it : row_state_var_incidence)
col_state_var_incidence.insert(make_pair(row_state_var_incidence_it.second, row_state_var_incidence_it.first));
auto col_state_var_incidence_it = col_state_var_incidence.begin();
......@@ -3366,7 +3366,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
output << modstruct << "n_diag = " << nb_diag << ";" << endl;
KF_index_file.write(reinterpret_cast<char *>(&nb_diag), sizeof(nb_diag));
typedef pair<int, pair<int, int > > index_KF;
typedef pair<int, pair<int, int >> index_KF;
vector<index_KF> v_index_KF;
for (int i = 0; i < n; i++)
//int i = 0;
......@@ -3463,10 +3463,10 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de
it->ExprNode::writeOutput(output, oMatlabDynamicModel);
}
map<pair<int, pair<int, int > >, expr_t>
map<pair<int, pair<int, int >>, expr_t>
DynamicModel::collect_first_order_derivatives_endogenous()
{
map<pair<int, pair<int, int > >, expr_t> endo_derivatives;
map<pair<int, pair<int, int >>, expr_t> endo_derivatives;
for (auto & first_derivative : first_derivatives)
{
if (getTypeByDerivID(first_derivative.first.second) == eEndogenous)
......@@ -3492,14 +3492,14 @@ DynamicModel::getVarModelVariablesFromEqTags(vector<string> &var_model_eqtags,
vector<int> &eqnumber,
vector<int> &lhs,
vector<expr_t> &lhs_expr_t,
vector<set<pair<int, int> > > &rhs,
vector<set<pair<int, int>>> &rhs,
vector<bool> &nonstationary) const
{
for (vector<string>::const_iterator itvareqs = var_model_eqtags.begin();
itvareqs != var_model_eqtags.end(); itvareqs++)
{
int eqn = -1;
set<pair<int, int> > lhs_set, lhs_tmp_set, rhs_set;
set<pair<int, int>> lhs_set, lhs_tmp_set, rhs_set;
string eqtag (*itvareqs);
for (const auto & equation_tag : equation_tags)
if (equation_tag.second.first == "name"
......@@ -3619,7 +3619,7 @@ DynamicModel::getVarLhsDiffAndInfo(vector<int> &eqnumber, vector<bool> &diff,
equations[*it]->get_arg1()->countDiffs() > 0 ? diff.push_back(true) : diff.push_back(false);
if (diff.back())
{
set<pair<int, int> > diff_set;
set<pair<int, int>> diff_set;
equations[*it]->get_arg1()->collectDynamicVariables(eEndogenous, diff_set);
if (diff_set.size() != 1)
......@@ -3635,18 +3635,18 @@ DynamicModel::getVarLhsDiffAndInfo(vector<int> &eqnumber, vector<bool> &diff,
}
void
DynamicModel::setVarExpectationIndices(map<string, pair<SymbolList, int> > &var_model_info)
DynamicModel::setVarExpectationIndices(map<string, pair<SymbolList, int>> &var_model_info)
{
for (auto & equation : equations)
equation->setVarExpectationIndex(var_model_info);
}
void
DynamicModel::addEquationsForVar(map<string, pair<SymbolList, int> > &var_model_info)
DynamicModel::addEquationsForVar(map<string, pair<SymbolList, int>> &var_model_info)
{