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)
......
This diff is collapsed.
......@@ -40,13 +40,13 @@ private:
vector<int> static_only_equations_lineno;
//! 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;
//! Maps a pair (symbol_id, lag) to a deriv ID
deriv_id_table_t deriv_id_table;
//! 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
/*! Contains only endogenous, exogenous and exogenous deterministic */
......@@ -75,10 +75,10 @@ private:
//! Cross reference information
map<int, ExprNode::EquationInfo> xrefs;
map<pair<int, int>, set<int> > xref_param;
map<pair<int, int>, set<int> > xref_endo;
map<pair<int, int>, set<int> > xref_exo;
map<pair<int, int>, set<int> > xref_exo_det;
map<pair<int, int>, set<int>> xref_param;
map<pair<int, int>, set<int>> xref_endo;
map<pair<int, int>, set<int>> xref_exo;
map<pair<int, int>, set<int>> xref_exo_det;
//! Nonzero equations in the Hessian
map<int, string> nonzero_hessian_eqs;
......@@ -87,12 +87,12 @@ private:
/*! Set by computeDerivID()s and computeDynJacobianCols() */
int dynJacobianColsNbr;
//! 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;
//! 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;
//! Writes dynamic model file (Matlab version)
......@@ -129,7 +129,7 @@ private:
//void evaluateJacobian(const eval_context_t &eval_context, jacob_map *j_m, bool dynamic);
//! 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
void computeChainRuleJacobian(blocks_derivatives_t &blocks_derivatives);
......@@ -157,7 +157,7 @@ private:
//! 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);
//! 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
/*! Also computes max_{endo,exo}_{lead_lag}, and initializes dynJacobianColsNbr to the number of dynamic endos */
......@@ -183,7 +183,7 @@ private:
//! 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;
//! 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;
//! for all blocks derivatives description
......@@ -196,7 +196,7 @@ private:
vector<bool> blocks_linear;
//! 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<derivative_t> derivative_endo, derivative_other_endo, derivative_exo, derivative_exo_det;
......@@ -206,33 +206,33 @@ private:
vector<lag_var_t> other_endo_block, exo_block, exo_det_block;
//!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
/*! pair< pair<static, forward>, pair<backward,mixed> > */
vector<pair< pair<int, int>, pair<int, int> > > block_col_type;
/*! pair< pair<static, forward>, pair<backward,mixed>> */
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)
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
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
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
vector<int> equation_block;
//! 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
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
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 writeDynamicModelHelper(const string &name, const string &retvalname,
......@@ -288,7 +288,7 @@ public:
//! Write cross reference output if the xref maps have been filed
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
void printNonZeroHessianEquations(ostream &output) const;
......@@ -301,7 +301,7 @@ public:
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;
//! Returns the max lag of the VAR
......@@ -315,9 +315,9 @@ public:
vector<int> &orig_diff_var) const;
//! 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
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
void walkPacParameters();
//! Add var_model info to pac_expectation nodes
......@@ -365,7 +365,7 @@ public:
void replaceMyEquations(DynamicModel &dynamic_model) const;
//! 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
size_t staticOnlyEquationsNbr() const;
......@@ -436,7 +436,7 @@ public:
void fillVarExpectationFunctionsToWrite();
//! Get var_expectation_functions_to_write
map<string, set<int> > getVarExpectationFunctionsToWrite() const;
map<string, set<int>> getVarExpectationFunctionsToWrite() const;
//! Transforms the model by replacing trend variables with a 1
void removeTrendVariableFromEquations();
......
This diff is collapsed.
This diff is collapsed.
......@@ -33,7 +33,7 @@ namespace MFS
property<vertex_index1_t, int,
property<vertex_degree_t, int,
property<vertex_in_degree_t, int,
property<vertex_out_degree_t, int > > > > > VertexProperty_t;
property<vertex_out_degree_t, int >>>>> VertexProperty_t;
typedef adjacency_list<listS, listS, bidirectionalS, VertexProperty_t> AdjacencyList_t;
typedef map<graph_traits<AdjacencyList_t>::vertex_descriptor, default_color_type> color_t;
using vector_vertex_descriptor_t = vector<AdjacencyList_t::vertex_descriptor>;
......
......@@ -372,11 +372,11 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
dynamic_model.substituteDiff(diff_static_model, diff_subst_table);
// Var Model
map<string, pair<SymbolList, int> > var_model_info_var_expectation;
map<string, vector<string> > var_model_eq_tags;
map<string, pair<pair<pair<vector<int>, vector<expr_t> >,
pair<vector<bool>, vector<int> > >,
pair<pair<int, vector<bool> >, vector<int> > > >
map<string, pair<SymbolList, int>> var_model_info_var_expectation;
map<string, vector<string>> var_model_eq_tags;
map<string, pair<pair<pair<vector<int>, vector<expr_t>>,
pair<vector<bool>, vector<int>>>,
pair<pair<int, vector<bool>>, vector<int>>>>
var_model_info_pac_expectation;
for (vector<Statement *>::const_iterator it = statements.begin();
it != statements.end(); it++)
......@@ -388,7 +388,7 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
vms->getVarModelInfo(var_model_name, var_model_info_var_expectation, var_model_eq_tags);
vector<expr_t> lhs_expr_t;
vector<int> lhs, eqnumber, orig_diff_var;
vector<set<pair<int, int> > > rhs;
vector<set<pair<int, int>>> rhs;
vector<bool> nonstationary, diff;
vector<string> eqtags = var_model_eq_tags[var_model_name];
dynamic_model.getVarModelVariablesFromEqTags(eqtags,
......@@ -406,7 +406,7 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
auto *pms = dynamic_cast<PacModelStatement *>(*it);
if (pms != nullptr)
{
pair<string, pair<string, pair<string, pair<int, map<string, int> > > > >
pair<string, pair<string, pair<string, pair<int, map<string, int>>>>>
pac_model_info_pac_expectation;
pms->getPacModelInfoForPacExpectation(pac_model_info_pac_expectation);
string pac_model_name = pac_model_info_pac_expectation.first;
......@@ -530,7 +530,7 @@ ModFile::transformPass(bool nostrict, bool stochastic, bool compute_xrefs, const
vms->getVarModelInfo(var_model_name, var_model_info_var_expectation, var_model_eq_tags);
vector<expr_t> lhs_expr_t;
vector<int> lhs, eqnumber, orig_diff_var;
vector<set<pair<int, int> > > rhs;
vector<set<pair<int, int>>> rhs;
vector<bool> nonstationary, diff;
vector<string> eqtags = var_model_eq_tags[var_model_name];
dynamic_model.getVarModelVariablesFromEqTags(eqtags,
......
This diff is collapsed.
......@@ -32,16 +32,16 @@ using namespace std;
#include "ExtendedPreprocessorTypes.hh"
//! Vector describing equations: BlockSimulationType, if BlockSimulationType == EVALUATE_s then a expr_t on the new normalized equation
typedef vector<pair<EquationType, expr_t > > equation_type_and_normalized_equation_t;
typedef vector<pair<EquationType, expr_t >> equation_type_and_normalized_equation_t;
//! Vector describing variables: max_lag in the block, max_lead in the block
typedef vector<pair< int, int> > lag_lead_vector_t;
typedef vector<pair< int, int>> lag_lead_vector_t;
//! for each block contains pair< pair<Simulation_Type, first_equation>, pair < Block_Size, Recursive_part_Size > >
typedef vector<pair< pair< BlockSimulationType, int>, pair<int, int> > > block_type_firstequation_size_mfs_t;
//! for each block contains pair< pair<Simulation_Type, first_equation>, pair < Block_Size, Recursive_part_Size >>
typedef vector<pair< pair< BlockSimulationType, int>, pair<int, int>>> block_type_firstequation_size_mfs_t;
//! for a block contains derivatives pair< pair<block_equation_number, block_variable_number> , pair<lead_lag, expr_t> >
typedef vector< pair<pair<int, int>, pair< int, expr_t > > > block_derivatives_equation_variable_laglead_nodeid_t;
//! for a block contains derivatives pair< pair<block_equation_number, block_variable_number> , pair<lead_lag, expr_t>>
typedef vector< pair<pair<int, int>, pair< int, expr_t >>> block_derivatives_equation_variable_laglead_nodeid_t;
//! for all blocks derivatives description
using blocks_derivatives_t = vector<block_derivatives_equation_variable_laglead_nodeid_t>;
......@@ -68,7 +68,7 @@ protected:
deque<BinaryOpNode *> diff_aux_equations;
//! Stores equation tags
vector<pair<int, pair<string, string> > > equation_tags;
vector<pair<int, pair<string, string>>> equation_tags;
//! Number of non-zero derivatives
int NNZDerivatives[3];
......@@ -81,7 +81,7 @@ protected:
*/
first_derivatives_t first_derivatives;
typedef map<pair<int, pair<int, int> >, expr_t> second_derivatives_t;
typedef map<pair<int, pair<int, int>>, expr_t> second_derivatives_t;
//! Second order derivatives
/*! First index is equation number, second and third are variables w.r. to which is computed the derivative.
Only non-null derivatives are stored in the map.
......@@ -90,7 +90,7 @@ protected:
*/
second_derivatives_t second_derivatives;
typedef map<pair<int, pair<int, pair<int, int> > >, expr_t> third_derivatives_t;
typedef map<pair<int, pair<int, pair<int, int>>>, expr_t> third_derivatives_t;
//! Third order derivatives
/*! First index is equation number, second, third and fourth are variables w.r. to which is computed the derivative.
Only non-null derivatives are stored in the map.
......@@ -158,7 +158,7 @@ protected:
map<int, expr_t> trend_symbols_map;
//! for all trends; the boolean is true if this is a log-trend, false otherwise
typedef map<int, pair<bool, expr_t> > nonstationary_symbols_map_t;
typedef map<int, pair<bool, expr_t>> nonstationary_symbols_map_t;
//! Nonstationary variables and their deflators
nonstationary_symbols_map_t nonstationary_symbols_map;
......@@ -221,7 +221,7 @@ protected:
//! Sparse matrix of double to store the values of the Jacobian
/*! First index is lag, second index is equation number, third index is endogenous type specific ID */
typedef map<pair<int, pair<int, int> >, expr_t> dynamic_jacob_map_t;
typedef map<pair<int, pair<int, int>>, expr_t> dynamic_jacob_map_t;
//! Normalization of equations
/*! Maps endogenous type specific IDs to equation numbers */
......@@ -255,15 +255,15 @@ protected:
//! Search the equations and variables belonging to the prologue and the epilogue of the model
void computePrologueAndEpilogue(const jacob_map_t &static_jacobian, vector<int> &equation_reordered, vector<int> &variable_reordered);
//! Determine the type of each equation of model and try to normalized the unnormalized equation using computeNormalizedEquations
equation_type_and_normalized_equation_t equationTypeDetermination(const map<pair<int, pair<int, int> >, expr_t> &first_order_endo_derivatives, const vector<int> &Index_Var_IM, const vector<int> &Index_Equ_IM, int mfs) const;
equation_type_and_normalized_equation_t equationTypeDetermination(const map<pair<int, pair<int, int>>, expr_t> &first_order_endo_derivatives, const vector<int> &Index_Var_IM, const vector<int> &Index_Equ_IM, int mfs) const;
//! Compute the block decomposition and for a non-recusive block find the minimum feedback set
void computeBlockDecompositionAndFeedbackVariablesForEachBlock(const jacob_map_t &static_jacobian, const dynamic_jacob_map_t &dynamic_jacobian, vector<int> &equation_reordered, vector<int> &variable_reordered, vector<pair<int, int> > &blocks, const equation_type_and_normalized_equation_t &Equation_Type, bool verbose_, bool select_feedback_variable, int mfs, vector<int> &inv_equation_reordered, vector<int> &inv_variable_reordered, lag_lead_vector_t &equation_lag_lead, lag_lead_vector_t &variable_lag_lead_t, vector<unsigned int> &n_static, vector<unsigned int> &n_forward, vector<unsigned int> &n_backward, vector<unsigned int> &n_mixed) const;
void computeBlockDecompositionAndFeedbackVariablesForEachBlock(const jacob_map_t &static_jacobian, const dynamic_jacob_map_t &dynamic_jacobian, vector<int> &equation_reordered, vector<int> &variable_reordered, vector<pair<int, int>> &blocks, const equation_type_and_normalized_equation_t &Equation_Type, bool verbose_, bool select_feedback_variable, int mfs, vector<int> &inv_equation_reordered, vector<int> &inv_variable_reordered, lag_lead_vector_t &equation_lag_lead, lag_lead_vector_t &variable_lag_lead_t, vector<unsigned int> &n_static, vector<unsigned int> &n_forward, vector<unsigned int> &n_backward, vector<unsigned int> &n_mixed) const;
//! Reduce the number of block merging the same type equation in the prologue and the epilogue and determine the type of each block
block_type_firstequation_size_mfs_t reduceBlocksAndTypeDetermination(const dynamic_jacob_map_t &dynamic_jacobian, vector<pair<int, int> > &blocks, const equation_type_and_normalized_equation_t &Equation_Type, const vector<int> &variable_reordered, const vector<int> &equation_reordered, vector<unsigned int> &n_static, vector<unsigned int> &n_forward, vector<unsigned int> &n_backward, vector<unsigned int> &n_mixed, vector<pair< pair<int, int>, pair<int, int> > > &block_col_type);
block_type_firstequation_size_mfs_t reduceBlocksAndTypeDetermination(const dynamic_jacob_map_t &dynamic_jacobian, vector<pair<int, int>> &blocks, const equation_type_and_normalized_equation_t &Equation_Type, const vector<int> &variable_reordered, const vector<int> &equation_reordered, vector<unsigned int> &n_static, vector<unsigned int> &n_forward, vector<unsigned int> &n_backward, vector<unsigned int> &n_mixed, vector<pair< pair<int, int>, pair<int, int>>> &block_col_type);
//! Determine the maximum number of lead and lag for the endogenous variable in a bloc
void getVariableLeadLagByBlock(const dynamic_jacob_map_t &dynamic_jacobian, const vector<int> &components_set, int nb_blck_sim, lag_lead_vector_t &equation_lead_lag, lag_lead_vector_t &variable_lead_lag, const vector<int> &equation_reordered, const vector<int> &variable_reordered) const;
//! Print an abstract of the block structure of the model
void printBlockDecomposition(const vector<pair<int, int> > &blocks) const;
void printBlockDecomposition(const vector<pair<int, int>> &blocks) const;
//! Determine for each block if it is linear or not
vector<bool> BlockLinear(const blocks_derivatives_t &blocks_derivatives, const vector<int> &variable_reordered) const;
......@@ -331,7 +331,7 @@ public:
//! Declare a node as an equation of the model; also give its line number
void addEquation(expr_t eq, int lineno);
//! Declare a node as an equation of the model, also giving its tags
void addEquation(expr_t eq, int lineno, const vector<pair<string, string> > &eq_tags);
void addEquation(expr_t eq, int lineno, const vector<pair<string, string>> &eq_tags);
//! Declare a node as an auxiliary equation of the model, adding it at the end of the list of auxiliary equations
void addAuxEquation(expr_t eq);
//! Returns the number of equations in the model
......
......@@ -55,7 +55,7 @@ public:
We use a vector instead of a map, since the order of declaration matters:
an initialization can depend on a previously initialized variable inside the block
*/
typedef vector<pair<int, expr_t> > init_values_t;
typedef vector<pair<int, expr_t>> init_values_t;
protected:
const init_values_t init_values;
const SymbolTable &symbol_table;
......@@ -149,7 +149,7 @@ class HomotopyStatement : public Statement
public:
//! Stores the declarations of homotopy_setup
/*! Order matter so we use a vector. First expr_t can be NULL if no initial value given. */
typedef vector<pair<int, pair<expr_t, expr_t> > > homotopy_values_t;
typedef vector<pair<int, pair<expr_t, expr_t>>> homotopy_values_t;
private:
const homotopy_values_t homotopy_values;
const SymbolTable &symbol_table;
......
......@@ -979,7 +979,7 @@ ParsingDriver::end_model()
{
bool exit_after_write = false;
if (model_errors.size() > 0)
for (vector<pair<string, string> >::const_iterator it = model_errors.begin();