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: ...@@ -1677,7 +1677,7 @@ public:
}; };
#ifdef BYTE_CODE #ifdef BYTE_CODE
typedef vector<pair<Tags, void * > > tags_liste_t; typedef vector<pair<Tags, void * >> tags_liste_t;
class CodeLoad class CodeLoad
{ {
private: private:
......
...@@ -374,7 +374,7 @@ PacModelStatement::writeJsonOutput(ostream &output) const ...@@ -374,7 +374,7 @@ PacModelStatement::writeJsonOutput(ostream &output) const
} }
void 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; int growth_symb_id = -1;
if (!growth.empty()) if (!growth.empty())
...@@ -395,8 +395,8 @@ VarModelStatement::VarModelStatement(SymbolList symbol_list_arg, ...@@ -395,8 +395,8 @@ VarModelStatement::VarModelStatement(SymbolList symbol_list_arg,
void void
VarModelStatement::getVarModelInfo(string &var_model_name, VarModelStatement::getVarModelInfo(string &var_model_name,
map<string, pair<SymbolList, int> > &var_model_info, map<string, pair<SymbolList, int>> &var_model_info,
map<string, vector<string> > &var_model_eqtags) const map<string, vector<string>> &var_model_eqtags) const
{ {
var_model_name = name; var_model_name = name;
if (symbol_list.empty()) if (symbol_list.empty())
...@@ -413,7 +413,7 @@ VarModelStatement::getVarModelInfo(string &var_model_name, ...@@ -413,7 +413,7 @@ VarModelStatement::getVarModelInfo(string &var_model_name,
void void
VarModelStatement::fillVarModelInfoFromEquations(vector<int> &eqnumber_arg, vector<int> &lhs_arg, 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> &nonstationary_arg,
vector<bool> &diff_arg, vector<bool> &diff_arg,
vector<int> &orig_diff_var_arg, vector<int> &orig_diff_var_arg,
...@@ -524,7 +524,7 @@ VarModelStatement::writeOutput(ostream &output, const string &basename, bool min ...@@ -524,7 +524,7 @@ VarModelStatement::writeOutput(ostream &output, const string &basename, bool min
} }
void 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()) if (var_expectation_functions_to_write.find(name) == var_expectation_functions_to_write.end())
return; return;
...@@ -571,12 +571,12 @@ VarEstimationStatement::writeOutput(ostream &output, const string &basename, boo ...@@ -571,12 +571,12 @@ VarEstimationStatement::writeOutput(ostream &output, const string &basename, boo
} }
VarRestrictionsStatement::VarRestrictionsStatement(const string &var_model_name_arg, VarRestrictionsStatement::VarRestrictionsStatement(const string &var_model_name_arg,
const map<string, vector<string> > &var_map_arg, const map<string, vector<string>> &var_map_arg,
map<int, map<int, SymbolList> > exclusion_restrictions_arg, map<int, map<int, SymbolList>> exclusion_restrictions_arg,
equation_restrictions_t equation_restrictions_arg, equation_restrictions_t equation_restrictions_arg,
crossequation_restrictions_t crossequation_restrictions_arg, crossequation_restrictions_t crossequation_restrictions_arg,
map<pair<int, int>, double> covariance_number_restriction_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) : const SymbolTable &symbol_table_arg) :
var_model_name(var_model_name_arg), var_model_name(var_model_name_arg),
var_map(var_map_arg), var_map(var_map_arg),
...@@ -1472,7 +1472,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo ...@@ -1472,7 +1472,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo
// Check that no parameter/endogenous is declared twice in the block // Check that no parameter/endogenous is declared twice in the block
set<string> already_declared; 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) for (const auto & it : estim_params_list)
{ {
if (it.type == 3) // Correlation if (it.type == 3) // Correlation
...@@ -4950,7 +4950,7 @@ SMMEstimationStatement::writeJsonOutput(ostream &output) const ...@@ -4950,7 +4950,7 @@ SMMEstimationStatement::writeJsonOutput(ostream &output) const
GenerateIRFsStatement::GenerateIRFsStatement(OptionsList options_list_arg, GenerateIRFsStatement::GenerateIRFsStatement(OptionsList options_list_arg,
vector<string> generate_irf_names_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)), options_list(move(options_list_arg)),
generate_irf_names(move(generate_irf_names_arg)), generate_irf_names(move(generate_irf_names_arg)),
generate_irf_elements(move(generate_irf_elements_arg)) generate_irf_elements(move(generate_irf_elements_arg))
......
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void writeJsonOutput(ostream &output) const override; void writeJsonOutput(ostream &output) const override;
void fillUndiffedLHS(vector<int> &lhs); 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 class VarModelStatement : public Statement
...@@ -151,7 +151,7 @@ private: ...@@ -151,7 +151,7 @@ private:
const string &name; const string &name;
const SymbolTable &symbol_table; const SymbolTable &symbol_table;
vector<int> eqnumber, lhs, orig_diff_var; 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; vector<bool> nonstationary, diff;
int max_lag; int max_lag;
public: public:
...@@ -160,41 +160,41 @@ public: ...@@ -160,41 +160,41 @@ public:
const string &name_arg, const string &name_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
void getVarModelInfo(string &var_model_name, void getVarModelInfo(string &var_model_name,
map<string, pair<SymbolList, int> > &var_model_info, map<string, pair<SymbolList, int>> &var_model_info,
map<string, vector<string> > &var_model_eqtags) const; map<string, vector<string>> &var_model_eqtags) const;
void fillVarModelInfoFromEquations(vector<int> &eqnumber_arg, vector<int> &lhs_arg, 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> &nonstationary_arg,
vector<bool> &diff_arg, vector<int> &orig_diff_var_arg, vector<bool> &diff_arg, vector<int> &orig_diff_var_arg,
int max_lag_arg); int max_lag_arg);
void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override; void checkPass(ModFileStructure &mod_file_struct, WarningConsolidation &warnings) override;
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const 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 class VarRestrictionsStatement : public Statement
{ {
private: 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 string &var_model_name;
const map<string, vector<string> > &var_map; const map<string, vector<string>> &var_map;
const map<int, map<int, SymbolList> > exclusion_restrictions; 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; 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; 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 crossequation_restrictions_t crossequation_restrictions;
const map<pair<int, int>, double> covariance_number_restriction; 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; const SymbolTable &symbol_table;
int findIdxInVector(const vector<string> &vecvars, const string &var) const; int findIdxInVector(const vector<string> &vecvars, const string &var) const;
public: public:
VarRestrictionsStatement(const string &var_model_name_arg, VarRestrictionsStatement(const string &var_model_name_arg,
const map<string, vector<string> > &var_map_arg, const map<string, vector<string>> &var_map_arg,
map<int, map<int, SymbolList> > exclusion_restrictions_arg, map<int, map<int, SymbolList>> exclusion_restrictions_arg,
equation_restrictions_t equation_restrictions_arg, equation_restrictions_t equation_restrictions_arg,
crossequation_restrictions_t crossequation_restrictions_arg, crossequation_restrictions_t crossequation_restrictions_arg,
map<pair<int, int>, double> covariance_number_restriction_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); const SymbolTable &symbol_table_arg);
void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override; void writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
}; };
...@@ -437,7 +437,7 @@ public: ...@@ -437,7 +437,7 @@ public:
class ModelComparisonStatement : public Statement class ModelComparisonStatement : public Statement
{ {
public: public:
typedef vector<pair<string, string> > filename_list_t; typedef vector<pair<string, string>> filename_list_t;
private: private:
filename_list_t filename_list; filename_list_t filename_list;
OptionsList options_list; OptionsList options_list;
...@@ -820,7 +820,7 @@ public: ...@@ -820,7 +820,7 @@ public:
class SvarIdentificationStatement : public Statement class SvarIdentificationStatement : public Statement
{ {
public: 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 struct svar_identification_restriction
{ {
int equation; int equation;
...@@ -906,7 +906,7 @@ class SubsamplesStatement : public Statement ...@@ -906,7 +906,7 @@ class SubsamplesStatement : public Statement
{ {
public: public:
//! Storage for declaring subsamples: map<subsample_name, <date1, date2 > //! 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: private:
const string name1; const string name1;
const string name2; const string name2;
...@@ -1203,11 +1203,11 @@ public: ...@@ -1203,11 +1203,11 @@ public:
private: private:
const OptionsList options_list; const OptionsList options_list;
const vector<string> generate_irf_names; const vector<string> generate_irf_names;
const vector<map<string, double> > generate_irf_elements; const vector<map<string, double>> generate_irf_elements;
public: public:
GenerateIRFsStatement(OptionsList options_list_arg, GenerateIRFsStatement(OptionsList options_list_arg,
vector<string> generate_irf_names_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 writeOutput(ostream &output, const string &basename, bool minimal_workspace) const override;
void writeJsonOutput(ostream &output) const override; void writeJsonOutput(ostream &output) const override;
}; };
......
...@@ -367,10 +367,10 @@ ConfigFile::getConfigFileInfo(const string &config_file) ...@@ -367,10 +367,10 @@ ConfigFile::getConfigFileInfo(const string &config_file)
else if (!tokenizedLine.front().compare("Members")) else if (!tokenizedLine.front().compare("Members"))
{ {
char_separator<char> sep(" ,;", "()", drop_empty_tokens); 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; bool begin_weight = false;
string node_name; 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++) it != tokens.end(); it++)
{ {
string token(*it); string token(*it);
...@@ -683,8 +683,8 @@ ConfigFile::getIncludePaths() const ...@@ -683,8 +683,8 @@ ConfigFile::getIncludePaths() const
vector<string> include_paths; vector<string> include_paths;
for (auto path : paths) for (auto path : paths)
{ {
map <string, vector<string> > pathmap = path->get_paths(); map <string, vector<string>> pathmap = path->get_paths();
for (map <string, vector<string> >::const_iterator mapit = pathmap.begin(); mapit != pathmap.end(); mapit++) for (map <string, vector<string>>::const_iterator mapit = pathmap.begin(); mapit != pathmap.end(); mapit++)
for (const auto & vecit : mapit->second) for (const auto & vecit : mapit->second)
include_paths.push_back(vecit); include_paths.push_back(vecit);
} }
......
...@@ -50,9 +50,9 @@ public: ...@@ -50,9 +50,9 @@ public:
Path(vector<string> &includepath_arg); Path(vector<string> &includepath_arg);
~Path(); ~Path();
private: private:
map<string, vector<string> > paths; map<string, vector<string>> paths;
public: public:
inline map<string, vector<string> > inline map<string, vector<string>>
get_paths() get_paths()
{ {
return paths; return paths;
......
...@@ -66,7 +66,7 @@ protected: ...@@ -66,7 +66,7 @@ protected:
variable_node_map_t variable_node_map; variable_node_map_t variable_node_map;
//! Pair( Pair(arg1, UnaryOpCode), Pair( Expectation Info Set, Pair(param1_symb_id, param2_symb_id)) )) //! 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; unary_op_node_map_t unary_op_node_map;
//! Pair( Pair( Pair(arg1, arg2), order of Power Derivative), opCode) //! 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; typedef map<pair<pair<pair<expr_t, expr_t>, int>, BinaryOpcode>, BinaryOpNode *> binary_op_node_map_t;
...@@ -79,7 +79,7 @@ protected: ...@@ -79,7 +79,7 @@ protected:
external_function_node_map_t external_function_node_map; external_function_node_map_t external_function_node_map;
// (model_name, (symb_id, forecast_horizon)) -> VarExpectationNode // (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; var_expectation_node_map_t var_expectation_node_map;
// model_name -> PacExpectationNode // model_name -> PacExpectationNode
...@@ -91,7 +91,7 @@ protected: ...@@ -91,7 +91,7 @@ protected:
first_deriv_external_function_node_map_t first_deriv_external_function_node_map; first_deriv_external_function_node_map_t first_deriv_external_function_node_map;
// ((arguments, (deriv_idx1, deriv_idx2)), symb_id) -> SecondDerivExternalFunctionNode // ((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; second_deriv_external_function_node_map_t second_deriv_external_function_node_map;
//! Stores local variables value (maps symbol ID to corresponding node) //! Stores local variables value (maps symbol ID to corresponding node)
......
This diff is collapsed.
...@@ -40,13 +40,13 @@ private: ...@@ -40,13 +40,13 @@ private:
vector<int> static_only_equations_lineno; vector<int> static_only_equations_lineno;
//! Stores the equation tags of equations declared as [static] //! Stores the equation tags of equations declared as [static]
vector<vector<pair<string, string> > > static_only_equations_equation_tags; vector<vector<pair<string, string>>> static_only_equations_equation_tags;
typedef map<pair<int, int>, int> deriv_id_table_t; typedef map<pair<int, int>, int> deriv_id_table_t;
//! Maps a pair (symbol_id, lag) to a deriv ID //! Maps a pair (symbol_id, lag) to a deriv ID
deriv_id_table_t deriv_id_table; deriv_id_table_t deriv_id_table;
//! Maps a deriv ID to a pair (symbol_id, lag) //! Maps a deriv ID to a pair (symbol_id, lag)
vector<pair<int, int> > inv_deriv_id_table; vector<pair<int, int>> inv_deriv_id_table;
//! Maps a deriv_id to the column index of the dynamic Jacobian //! Maps a deriv_id to the column index of the dynamic Jacobian
/*! Contains only endogenous, exogenous and exogenous deterministic */ /*! Contains only endogenous, exogenous and exogenous deterministic */
...@@ -75,10 +75,10 @@ private: ...@@ -75,10 +75,10 @@ private:
//! Cross reference information //! Cross reference information
map<int, ExprNode::EquationInfo> xrefs; map<int, ExprNode::EquationInfo> xrefs;
map<pair<int, int>, set<int> > xref_param; map<pair<int, int>, set<int>> xref_param;
map<pair<int, int>, set<int> > xref_endo; map<pair<int, int>, set<int>> xref_endo;
map<pair<int, int>, set<int> > xref_exo; map<pair<int, int>, set<int>> xref_exo;
map<pair<int, int>, set<int> > xref_exo_det; map<pair<int, int>, set<int>> xref_exo_det;
//! Nonzero equations in the Hessian //! Nonzero equations in the Hessian
map<int, string> nonzero_hessian_eqs; map<int, string> nonzero_hessian_eqs;
...@@ -87,12 +87,12 @@ private: ...@@ -87,12 +87,12 @@ private:
/*! Set by computeDerivID()s and computeDynJacobianCols() */ /*! Set by computeDerivID()s and computeDynJacobianCols() */
int dynJacobianColsNbr; int dynJacobianColsNbr;
//! Temporary terms for block decomposed models //! Temporary terms for block decomposed models
vector< vector<temporary_terms_t> > v_temporary_terms; vector< vector<temporary_terms_t>> v_temporary_terms;
vector<temporary_terms_inuse_t> v_temporary_terms_inuse; vector<temporary_terms_inuse_t> v_temporary_terms_inuse;
//! Store the derivatives or the chainrule derivatives:map<pair< equation, pair< variable, lead_lag >, expr_t> //! Store the derivatives or the chainrule derivatives:map<pair< equation, pair< variable, lead_lag >, expr_t>
typedef map< pair< int, pair< int, int> >, expr_t> first_chain_rule_derivatives_t; typedef map< pair< int, pair< int, int>>, expr_t> first_chain_rule_derivatives_t;
first_chain_rule_derivatives_t first_chain_rule_derivatives; first_chain_rule_derivatives_t first_chain_rule_derivatives;
//! Writes dynamic model file (Matlab version) //! Writes dynamic model file (Matlab version)
...@@ -129,7 +129,7 @@ private: ...@@ -129,7 +129,7 @@ private:
//void evaluateJacobian(const eval_context_t &eval_context, jacob_map *j_m, bool dynamic); //void evaluateJacobian(const eval_context_t &eval_context, jacob_map *j_m, bool dynamic);
//! return a map on the block jacobian //! return a map on the block jacobian
map<pair<pair<int, pair<int, int> >, pair<int, int> >, int> get_Derivatives(int block); map<pair<pair<int, pair<int, int>>, pair<int, int>>, int> get_Derivatives(int block);
//! Computes chain rule derivatives of the Jacobian w.r. to endogenous variables //! Computes chain rule derivatives of the Jacobian w.r. to endogenous variables
void computeChainRuleJacobian(blocks_derivatives_t &blocks_derivatives); void computeChainRuleJacobian(blocks_derivatives_t &blocks_derivatives);
...@@ -157,7 +157,7 @@ private: ...@@ -157,7 +157,7 @@ private:
//! Computes derivatives of the Jacobian w.r. to trend vars and tests that they are equal to zero //! Computes derivatives of the Jacobian w.r. to trend vars and tests that they are equal to zero
void testTrendDerivativesEqualToZero(const eval_context_t &eval_context); void testTrendDerivativesEqualToZero(const eval_context_t &eval_context);
//! Collect only the first derivatives //! Collect only the first derivatives
map<pair<int, pair<int, int> >, expr_t> collect_first_order_derivatives_endogenous(); map<pair<int, pair<int, int>>, expr_t> collect_first_order_derivatives_endogenous();
//! Allocates the derivation IDs for all dynamic variables of the model //! Allocates the derivation IDs for all dynamic variables of the model
/*! Also computes max_{endo,exo}_{lead_lag}, and initializes dynJacobianColsNbr to the number of dynamic endos */ /*! Also computes max_{endo,exo}_{lead_lag}, and initializes dynJacobianColsNbr to the number of dynamic endos */
...@@ -183,7 +183,7 @@ private: ...@@ -183,7 +183,7 @@ private:
//! Vector describing equations: BlockSimulationType, if BlockSimulationType == EVALUATE_s then a expr_t on the new normalized equation //! Vector describing equations: BlockSimulationType, if BlockSimulationType == EVALUATE_s then a expr_t on the new normalized equation
equation_type_and_normalized_equation_t equation_type_and_normalized_equation; equation_type_and_normalized_equation_t equation_type_and_normalized_equation;
//! for each block contains pair< Simulation_Type, pair < Block_Size, Recursive_part_Size > > //! for each block contains pair< Simulation_Type, pair < Block_Size, Recursive_part_Size >>
block_type_firstequation_size_mfs_t block_type_firstequation_size_mfs; block_type_firstequation_size_mfs_t block_type_firstequation_size_mfs;
//! for all blocks derivatives description //! for all blocks derivatives description
...@@ -196,7 +196,7 @@ private: ...@@ -196,7 +196,7 @@ private:
vector<bool> blocks_linear; vector<bool> blocks_linear;
//! Map the derivatives for a block pair<lag, make_pair(make_pair(eq, var)), expr_t> //! Map the derivatives for a block pair<lag, make_pair(make_pair(eq, var)), expr_t>
typedef map<pair< int, pair<int, int> >, expr_t> derivative_t; typedef map<pair< int, pair<int, int>>, expr_t> derivative_t;
//! Vector of derivative for each blocks //! Vector of derivative for each blocks
vector<derivative_t> derivative_endo, derivative_other_endo, derivative_exo, derivative_exo_det; vector<derivative_t> derivative_endo, derivative_other_endo, derivative_exo, derivative_exo_det;
...@@ -206,33 +206,33 @@ private: ...@@ -206,33 +206,33 @@ private:
vector<lag_var_t> other_endo_block, exo_block, exo_det_block; vector<lag_var_t> other_endo_block, exo_block, exo_det_block;
//!List for each block the exogenous variables //!List for each block the exogenous variables
vector<pair<var_t, int> > block_var_exo; vector<pair<var_t, int>> block_var_exo;
map< int, map<int, int> > block_exo_index, block_det_exo_index, block_other_endo_index; map< int, map<int, int>> block_exo_index, block_det_exo_index, block_other_endo_index;
//! for each block described the number of static, forward, backward and mixed variables in the block //! for each block described the number of static, forward, backward and mixed variables in the block
/*! pair< pair<static, forward>, pair<backward,mixed> > */ /*! pair< pair<static, forward>, pair<backward,mixed>> */
vector<pair< pair<int, int>, pair<int, int> > > block_col_type; vector<pair< pair<int, int>, pair<int, int>>> block_col_type;
//! Help computeXrefs to compute the reverse references (i.e. param->eqs, endo->eqs, etc) //! Help computeXrefs to compute the reverse references (i.e. param->eqs, endo->eqs, etc)
void computeRevXref(map<pair<int, int>, set<int> > &xrefset, const set<pair<int, int> > &eiref, int eqn); void computeRevXref(map<pair<int, int>, set<int>> &xrefset, const set<pair<int, int>> &eiref, int eqn);
//! Write reverse cross references //! Write reverse cross references
void writeRevXrefs(ostream &output, const map<pair<int, int>, set<int> > &xrefmap, const string &type) const; void writeRevXrefs(ostream &output, const map<pair<int, int>, set<int>> &xrefmap, const string &type) const;
//! List for each variable its block number and its maximum lag and lead inside the block //! List for each variable its block number and its maximum lag and lead inside the block
vector<pair<int, pair<int, int> > > variable_block_lead_lag; vector<pair<int, pair<int, int>>> variable_block_lead_lag;
//! List for each equation its block number //! List for each equation its block number
vector<int> equation_block; vector<int> equation_block;
//! Used for var_expectation and var_model //! Used for var_expectation and var_model
map<string, set<int> > var_expectation_functions_to_write; map<string, set<int>> var_expectation_functions_to_write;
//! Used for pac_expectation operator //! Used for pac_expectation operator
set<const PacExpectationNode *> pac_expectation_info; // PacExpectationNode pointers set<const PacExpectationNode *> pac_expectation_info; // PacExpectationNode pointers
//!Maximum lead and lag for each block on endogenous of the block, endogenous of the previous blocks, exogenous and deterministic exogenous //!Maximum lead and lag for each block on endogenous of the block, endogenous of the previous blocks, exogenous and deterministic exogenous
vector<pair<int, int> > endo_max_leadlag_block, other_endo_max_leadlag_block, exo_max_leadlag_block, exo_det_max_leadlag_block, max_leadlag_block; vector<pair<int, int>> endo_max_leadlag_block, other_endo_max_leadlag_block, exo_max_leadlag_block, exo_det_max_leadlag_block, max_leadlag_block;
void writeWrapperFunctions(const string &name, const string &ending) const; void writeWrapperFunctions(const string &name, const string &ending) const;
void writeDynamicModelHelper(const string &name, const string &retvalname, void writeDynamicModelHelper(const string &name, const string &retvalname,
...@@ -288,7 +288,7 @@ public: ...@@ -288,7 +288,7 @@ public:
//! Write cross reference output if the xref maps have been filed //! Write cross reference output if the xref maps have been filed
void writeJsonXrefs(ostream &output) const; void writeJsonXrefs(ostream &output) const;
void writeJsonXrefsHelper(ostream &output, const map<pair<int, int>, set<int> > &xrefs) const; void writeJsonXrefsHelper(ostream &output, const map<pair<int, int>, set<int>> &xrefs) const;
//! Print equations that have non-zero second derivatives //! Print equations that have non-zero second derivatives
void printNonZeroHessianEquations(ostream &output) const; void printNonZeroHessianEquations(ostream &output) const;
...@@ -301,7 +301,7 @@ public: ...@@ -301,7 +301,7 @@ public:
vector<int> &eqnumber, vector<int> &eqnumber,
vector<int> &lhs, vector<int> &lhs,
vector<expr_t> &lhs_expr_t, vector<expr_t> &lhs_expr_t,
vector<set<pair<int, int> > > &rhs, vector<set<pair<int, int>>> &rhs,
vector<bool> &nonstationary) const; vector<bool> &nonstationary) const;
//! Returns the max lag of the VAR //! Returns the max lag of the VAR
...@@ -315,9 +315,9 @@ public: ...@@ -315,9 +315,9 @@ public:
vector<int> &orig_diff_var) const; vector<int> &orig_diff_var) const;
//! Set indices for var expectation in dynamic model file //! Set indices for var expectation in dynamic model file
void setVarExpectationIndices(map<string, pair<SymbolList, int> > &var_model_info); void setVarExpectationIndices(map<string, pair<SymbolList, int>> &var_model_info);
//! Add aux equations (and aux variables) for variables declared in var_model at max order if they don't already exist //! Add aux equations (and aux variables) for variables declared in var_model at max order if they don't already exist
void addEquationsForVar(map<string, pair<SymbolList, int> > &var_model_info); void addEquationsForVar(map<string, pair<SymbolList, int>> &var_model_info);
//! Get Pac equation parameter info //! Get Pac equation parameter info
void walkPacParameters(); void walkPacParameters();
//! Add var_model info to pac_expectation nodes //! Add var_model info to pac_expectation nodes
...@@ -365,7 +365,7 @@ public: ...@@ -365,7 +365,7 @@ public:
void replaceMyEquations(DynamicModel &dynamic_model) const; void replaceMyEquations(DynamicModel &dynamic_model) const;
//! Adds an equation marked as [static] //! Adds an equation marked as [static]
void addStaticOnlyEquation(expr_t eq, int lineno, const vector<pair<string, string> > &eq_tags); void addStaticOnlyEquation(expr_t eq, int lineno, const vector<pair<string, string>> &eq_tags);
//! Returns number of static only equations //! Returns number of static only equations
size_t staticOnlyEquationsNbr() const; size_t staticOnlyEquationsNbr() const;
...@@ -436,7 +436,7 @@ public: ...@@ -436,7 +436,7 @@ public:
void fillVarExpectationFunctionsToWrite();