Commit 25cf12f4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: uniformize typedef names (with a "_t" suffix)

parent 3c57d731
...@@ -999,7 +999,7 @@ public: ...@@ -999,7 +999,7 @@ public:
}; };
#ifdef BYTE_CODE #ifdef BYTE_CODE
typedef vector<pair<Tags, void * > > tags_liste_type; typedef vector<pair<Tags, void * > > tags_liste_t;
class CodeLoad class CodeLoad
{ {
private: private:
...@@ -1017,10 +1017,10 @@ public: ...@@ -1017,10 +1017,10 @@ public:
{ {
return code; return code;
}; };
inline tags_liste_type inline tags_liste_t
get_op_code(string file_name) get_op_code(string file_name)
{ {
tags_liste_type tags_liste; tags_liste_t tags_liste;
ifstream CompiledCode; ifstream CompiledCode;
streamoff Code_Size; streamoff Code_Size;
CompiledCode.open((file_name + ".cod").c_str(), std::ios::in | std::ios::binary| std::ios::ate); CompiledCode.open((file_name + ".cod").c_str(), std::ios::in | std::ios::binary| std::ios::ate);
......
...@@ -112,7 +112,7 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -112,7 +112,7 @@ StochSimulStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.stoch_simul_present = true; mod_file_struct.stoch_simul_present = true;
// Fill in option_order of mod_file_struct // Fill in option_order of mod_file_struct
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order"); OptionsList::num_options_t::const_iterator it = options_list.num_options.find("order");
if (it != options_list.num_options.end()) if (it != options_list.num_options.end())
mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str())); mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str()));
...@@ -175,7 +175,7 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -175,7 +175,7 @@ RamseyPolicyStatement::checkPass(ModFileStructure &mod_file_struct)
/* Fill in option_order of mod_file_struct /* Fill in option_order of mod_file_struct
Since ramsey policy needs one further order of derivation (for example, for 1st order Since ramsey policy needs one further order of derivation (for example, for 1st order
approximation, it needs 2nd derivatives), we add 1 to the order declared by user */ approximation, it needs 2nd derivatives), we add 1 to the order declared by user */
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order"); OptionsList::num_options_t::const_iterator it = options_list.num_options.find("order");
if (it != options_list.num_options.end()) if (it != options_list.num_options.end())
{ {
int order = atoi(it->second.c_str()); int order = atoi(it->second.c_str());
...@@ -222,7 +222,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -222,7 +222,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.estimation_present = true; mod_file_struct.estimation_present = true;
// Fill in option_order of mod_file_struct // Fill in option_order of mod_file_struct
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order"); OptionsList::num_options_t::const_iterator it = options_list.num_options.find("order");
if (it != options_list.num_options.end()) if (it != options_list.num_options.end())
mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str())); mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str()));
...@@ -237,7 +237,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -237,7 +237,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.dsge_var_calibrated = it->second; mod_file_struct.dsge_var_calibrated = it->second;
// Fill in mod_file_struct.dsge_var_estimated // Fill in mod_file_struct.dsge_var_estimated
OptionsList::string_options_type::const_iterator it_str = options_list.string_options.find("dsge_var"); OptionsList::string_options_t::const_iterator it_str = options_list.string_options.find("dsge_var");
if (it_str != options_list.string_options.end()) if (it_str != options_list.string_options.end())
mod_file_struct.dsge_var_estimated = true; mod_file_struct.dsge_var_estimated = true;
...@@ -280,7 +280,7 @@ DynareSensitivityStatement::DynareSensitivityStatement(const OptionsList &option ...@@ -280,7 +280,7 @@ DynareSensitivityStatement::DynareSensitivityStatement(const OptionsList &option
void void
DynareSensitivityStatement::checkPass(ModFileStructure &mod_file_struct) DynareSensitivityStatement::checkPass(ModFileStructure &mod_file_struct)
{ {
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("identification"); OptionsList::num_options_t::const_iterator it = options_list.num_options.find("identification");
if (it != options_list.num_options.end() if (it != options_list.num_options.end()
&& it->second == "1") && it->second == "1")
mod_file_struct.identification_present = true; mod_file_struct.identification_present = true;
...@@ -366,8 +366,8 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -366,8 +366,8 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct)
if (it->prior == "1") //BETA_PDF is associated with "1" in DynareBison.yy if (it->prior == "1") //BETA_PDF is associated with "1" in DynareBison.yy
try try
{ {
if (it->mean->eval(eval_context_type()) == 0.5 && if (it->mean->eval(eval_context_t()) == 0.5 &&
it->std->eval(eval_context_type()) == 0.5) it->std->eval(eval_context_t()) == 0.5)
{ {
cerr << "ERROR: The prior density is not defined for the beta distribution when the mean = standard deviation = 0.5." << endl; cerr << "ERROR: The prior density is not defined for the beta distribution when the mean = standard deviation = 0.5." << endl;
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
...@@ -586,7 +586,7 @@ EstimatedParamsBoundsStatement::writeOutput(ostream &output, const string &basen ...@@ -586,7 +586,7 @@ EstimatedParamsBoundsStatement::writeOutput(ostream &output, const string &basen
} }
} }
ObservationTrendsStatement::ObservationTrendsStatement(const trend_elements_type &trend_elements_arg, ObservationTrendsStatement::ObservationTrendsStatement(const trend_elements_t &trend_elements_arg,
const SymbolTable &symbol_table_arg) : const SymbolTable &symbol_table_arg) :
trend_elements(trend_elements_arg), trend_elements(trend_elements_arg),
symbol_table(symbol_table_arg) symbol_table(symbol_table_arg)
...@@ -598,7 +598,7 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename) ...@@ -598,7 +598,7 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename)
{ {
output << "options_.trend_coeff_ = {};" << endl; output << "options_.trend_coeff_ = {};" << endl;
trend_elements_type::const_iterator it; trend_elements_t::const_iterator it;
for (it = trend_elements.begin(); it != trend_elements.end(); it++) for (it = trend_elements.begin(); it != trend_elements.end(); it++)
{ {
...@@ -615,9 +615,9 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename) ...@@ -615,9 +615,9 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename)
} }
} }
CalibVarStatement::CalibVarStatement(const calib_var_type &calib_var_arg, CalibVarStatement::CalibVarStatement(const calib_var_t &calib_var_arg,
const calib_covar_type &calib_covar_arg, const calib_covar_t &calib_covar_arg,
const calib_ac_type &calib_ac_arg, const calib_ac_t &calib_ac_arg,
const SymbolTable &symbol_table_arg) : const SymbolTable &symbol_table_arg) :
calib_var(calib_var_arg), calib_var(calib_var_arg),
calib_covar(calib_covar_arg), calib_covar(calib_covar_arg),
...@@ -642,7 +642,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const ...@@ -642,7 +642,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
} }
// Print calibration variances // Print calibration variances
for (calib_var_type::const_iterator it = calib_var.begin(); for (calib_var_t::const_iterator it = calib_var.begin();
it != calib_var.end(); it++) it != calib_var.end(); it++)
{ {
const string &name = it->first; const string &name = it->first;
...@@ -669,7 +669,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const ...@@ -669,7 +669,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
} }
// Print calibration covariances // Print calibration covariances
for (calib_covar_type::const_iterator it = calib_covar.begin(); for (calib_covar_t::const_iterator it = calib_covar.begin();
it != calib_covar.end(); it++) it != calib_covar.end(); it++)
{ {
const string &name1 = it->first.first; const string &name1 = it->first.first;
...@@ -700,7 +700,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const ...@@ -700,7 +700,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
// Print calibration autocorrelations // Print calibration autocorrelations
int max_iar = 3; int max_iar = 3;
for (calib_ac_type::const_iterator it = calib_ac.begin(); for (calib_ac_t::const_iterator it = calib_ac.begin();
it != calib_ac.end(); it++) it != calib_ac.end(); it++)
{ {
const string &name = it->first.first; const string &name = it->first.first;
...@@ -764,7 +764,7 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -764,7 +764,7 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.osr_present = true; mod_file_struct.osr_present = true;
// Fill in option_order of mod_file_struct // Fill in option_order of mod_file_struct
OptionsList::num_options_type::const_iterator it = options_list.num_options.find("order"); OptionsList::num_options_t::const_iterator it = options_list.num_options.find("order");
if (it != options_list.num_options.end()) if (it != options_list.num_options.end())
mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str())); mod_file_struct.order_option = max(mod_file_struct.order_option, atoi(it->second.c_str()));
...@@ -788,8 +788,8 @@ OsrStatement::writeOutput(ostream &output, const string &basename) const ...@@ -788,8 +788,8 @@ OsrStatement::writeOutput(ostream &output, const string &basename) const
output << "osr(var_list_,osr_params_,obj_var_,optim_weights_);\n"; output << "osr(var_list_,osr_params_,obj_var_,optim_weights_);\n";
} }
OptimWeightsStatement::OptimWeightsStatement(const var_weights_type &var_weights_arg, OptimWeightsStatement::OptimWeightsStatement(const var_weights_t &var_weights_arg,
const covar_weights_type &covar_weights_arg, const covar_weights_t &covar_weights_arg,
const SymbolTable &symbol_table_arg) : const SymbolTable &symbol_table_arg) :
var_weights(var_weights_arg), var_weights(var_weights_arg),
covar_weights(covar_weights_arg), covar_weights(covar_weights_arg),
...@@ -806,7 +806,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons ...@@ -806,7 +806,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons
<< "optim_weights_ = sparse(M_.endo_nbr,M_.endo_nbr);" << endl << "optim_weights_ = sparse(M_.endo_nbr,M_.endo_nbr);" << endl
<< "obj_var_ = [];" << endl << endl; << "obj_var_ = [];" << endl << endl;
for (var_weights_type::const_iterator it = var_weights.begin(); for (var_weights_t::const_iterator it = var_weights.begin();
it != var_weights.end(); it++) it != var_weights.end(); it++)
{ {
const string &name = it->first; const string &name = it->first;
...@@ -818,7 +818,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons ...@@ -818,7 +818,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons
output << "obj_var_ = [obj_var_; " << id << "];\n"; output << "obj_var_ = [obj_var_; " << id << "];\n";
} }
for (covar_weights_type::const_iterator it = covar_weights.begin(); for (covar_weights_t::const_iterator it = covar_weights.begin();
it != covar_weights.end(); it++) it != covar_weights.end(); it++)
{ {
const string &name1 = it->first.first; const string &name1 = it->first.first;
...@@ -863,7 +863,7 @@ DynaTypeStatement::writeOutput(ostream &output, const string &basename) const ...@@ -863,7 +863,7 @@ DynaTypeStatement::writeOutput(ostream &output, const string &basename) const
<< "',var_list_);" << endl; << "',var_list_);" << endl;
} }
ModelComparisonStatement::ModelComparisonStatement(const filename_list_type &filename_list_arg, ModelComparisonStatement::ModelComparisonStatement(const filename_list_t &filename_list_arg,
const OptionsList &options_list_arg) : const OptionsList &options_list_arg) :
filename_list(filename_list_arg), filename_list(filename_list_arg),
options_list(options_list_arg) options_list(options_list_arg)
...@@ -878,7 +878,7 @@ ModelComparisonStatement::writeOutput(ostream &output, const string &basename) c ...@@ -878,7 +878,7 @@ ModelComparisonStatement::writeOutput(ostream &output, const string &basename) c
output << "ModelNames_ = {};" << endl; output << "ModelNames_ = {};" << endl;
output << "ModelPriors_ = [];" << endl; output << "ModelPriors_ = [];" << endl;
for (filename_list_type::const_iterator it = filename_list.begin(); for (filename_list_t::const_iterator it = filename_list.begin();
it != filename_list.end(); it++) it != filename_list.end(); it++)
{ {
output << "ModelNames_ = { ModelNames_{:} '" << (*it).first << "'};" << endl; output << "ModelNames_ = { ModelNames_{:} '" << (*it).first << "'};" << endl;
...@@ -906,7 +906,7 @@ PlannerObjectiveStatement::checkPass(ModFileStructure &mod_file_struct) ...@@ -906,7 +906,7 @@ PlannerObjectiveStatement::checkPass(ModFileStructure &mod_file_struct)
void void
PlannerObjectiveStatement::computingPass() PlannerObjectiveStatement::computingPass()
{ {
model_tree->computingPass(eval_context_type(), false, true, false, false); model_tree->computingPass(eval_context_t(), false, true, false, false);
} }
void void
...@@ -1072,7 +1072,7 @@ PlotConditionalForecastStatement::writeOutput(ostream &output, const string &bas ...@@ -1072,7 +1072,7 @@ PlotConditionalForecastStatement::writeOutput(ostream &output, const string &bas
output << "plot_icforecast(var_list_, " << periods << ");" << endl; output << "plot_icforecast(var_list_, " << periods << ");" << endl;
} }
SvarIdentificationStatement::SvarIdentificationStatement(const svar_identification_exclusion_type &exclusion_arg, SvarIdentificationStatement::SvarIdentificationStatement(const svar_identification_exclusion_t &exclusion_arg,
const bool &upper_cholesky_present_arg, const bool &upper_cholesky_present_arg,
const bool &lower_cholesky_present_arg, const bool &lower_cholesky_present_arg,
const SymbolTable &symbol_table_arg) : const SymbolTable &symbol_table_arg) :
...@@ -1087,7 +1087,7 @@ int ...@@ -1087,7 +1087,7 @@ int
SvarIdentificationStatement::getMaxLag() const SvarIdentificationStatement::getMaxLag() const
{ {
int max_lag = 0; int max_lag = 0;
for (svar_identification_exclusion_type::const_iterator it = exclusion.begin(); it != exclusion.end(); it++) for (svar_identification_exclusion_t::const_iterator it = exclusion.begin(); it != exclusion.end(); it++)
if (it->first.first > max_lag) if (it->first.first > max_lag)
max_lag = it->first.first; max_lag = it->first.first;
...@@ -1151,7 +1151,7 @@ SvarIdentificationStatement::writeOutput(ostream &output, const string &basename ...@@ -1151,7 +1151,7 @@ SvarIdentificationStatement::writeOutput(ostream &output, const string &basename
output << "options_.ms.Qi = zeros(" << n << ", " << n << ", " << n << ");" << endl; output << "options_.ms.Qi = zeros(" << n << ", " << n << ", " << n << ");" << endl;
output << "options_.ms.Ri = zeros(" << k << ", " << k << ", " << n << ");" << endl; output << "options_.ms.Ri = zeros(" << k << ", " << k << ", " << n << ");" << endl;
for (svar_identification_exclusion_type::const_iterator it = exclusion.begin(); it != exclusion.end(); it++) for (svar_identification_exclusion_t::const_iterator it = exclusion.begin(); it != exclusion.end(); it++)
{ {
for (unsigned int h = 0; h < it->second.size(); h++) for (unsigned int h = 0; h < it->second.size(); h++)
{ {
...@@ -1197,7 +1197,7 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(const OptionsList &options_li ...@@ -1197,7 +1197,7 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(const OptionsList &options_li
void void
MarkovSwitchingStatement::writeOutput(ostream &output, const string &basename) const MarkovSwitchingStatement::writeOutput(ostream &output, const string &basename) const
{ {
OptionsList::num_options_type::const_iterator itChain, itState, itNOS, itDuration; OptionsList::num_options_t::const_iterator itChain, itState, itNOS, itDuration;
itChain = options_list.num_options.find("ms.chain"); itChain = options_list.num_options.find("ms.chain");
if (itChain == options_list.num_options.end()) if (itChain == options_list.num_options.end())
...@@ -1237,8 +1237,8 @@ SvarStatement::SvarStatement(const OptionsList &options_list_arg) : ...@@ -1237,8 +1237,8 @@ SvarStatement::SvarStatement(const OptionsList &options_list_arg) :
void void
SvarStatement::writeOutput(ostream &output, const string &basename) const SvarStatement::writeOutput(ostream &output, const string &basename) const
{ {
OptionsList::num_options_type::const_iterator it0, it1, it2; OptionsList::num_options_t::const_iterator it0, it1, it2;
OptionsList::vec_int_options_type::const_iterator itv; OptionsList::vec_int_options_t::const_iterator itv;
it0 = options_list.num_options.find("ms.chain"); it0 = options_list.num_options.find("ms.chain");
if (it0 != options_list.num_options.end()) if (it0 != options_list.num_options.end())
......
...@@ -169,12 +169,12 @@ public: ...@@ -169,12 +169,12 @@ public:
class ObservationTrendsStatement : public Statement class ObservationTrendsStatement : public Statement
{ {
public: public:
typedef map<string, NodeID> trend_elements_type; typedef map<string, NodeID> trend_elements_t;
private: private:
const trend_elements_type trend_elements; const trend_elements_t trend_elements;
const SymbolTable &symbol_table; const SymbolTable &symbol_table;
public: public:
ObservationTrendsStatement(const trend_elements_type &trend_elements_arg, ObservationTrendsStatement(const trend_elements_t &trend_elements_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const; virtual void writeOutput(ostream &output, const string &basename) const;
}; };
...@@ -225,12 +225,12 @@ public: ...@@ -225,12 +225,12 @@ public:
class ModelComparisonStatement : public Statement class ModelComparisonStatement : public Statement
{ {
public: public:
typedef vector<pair<string, string> > filename_list_type; typedef vector<pair<string, string> > filename_list_t;
private: private:
filename_list_type filename_list; filename_list_t filename_list;
OptionsList options_list; OptionsList options_list;
public: public:
ModelComparisonStatement(const filename_list_type &filename_list_arg, ModelComparisonStatement(const filename_list_t &filename_list_arg,
const OptionsList &options_list_arg); const OptionsList &options_list_arg);
virtual void writeOutput(ostream &output, const string &basename) const; virtual void writeOutput(ostream &output, const string &basename) const;
}; };
...@@ -298,15 +298,15 @@ public: ...@@ -298,15 +298,15 @@ public:
class OptimWeightsStatement : public Statement class OptimWeightsStatement : public Statement
{ {
public: public:
typedef map<string, NodeID> var_weights_type; typedef map<string, NodeID> var_weights_t;
typedef map<pair<string, string>, NodeID> covar_weights_type; typedef map<pair<string, string>, NodeID> covar_weights_t;
private: private:
const var_weights_type var_weights; const var_weights_t var_weights;
const covar_weights_type covar_weights; const covar_weights_t covar_weights;
const SymbolTable &symbol_table; const SymbolTable &symbol_table;
public: public:
OptimWeightsStatement(const var_weights_type &var_weights_arg, OptimWeightsStatement(const var_weights_t &var_weights_arg,
const covar_weights_type &covar_weights_arg, const covar_weights_t &covar_weights_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const; virtual void writeOutput(ostream &output, const string &basename) const;
}; };
...@@ -324,20 +324,20 @@ class CalibVarStatement : public Statement ...@@ -324,20 +324,20 @@ class CalibVarStatement : public Statement
{ {
public: public:
//! Maps a variable to a pair (weight, expression) //! Maps a variable to a pair (weight, expression)
typedef map<string, pair<string, NodeID> > calib_var_type; typedef map<string, pair<string, NodeID> > calib_var_t;
//! Maps a pair of variables to a pair (weight, expression) //! Maps a pair of variables to a pair (weight, expression)
typedef map<pair<string, string>, pair<string, NodeID> > calib_covar_type; typedef map<pair<string, string>, pair<string, NodeID> > calib_covar_t;
//! Maps a pair (variable, autocorr) to a pair (weight, expression) //! Maps a pair (variable, autocorr) to a pair (weight, expression)
typedef map<pair<string, int>, pair<string, NodeID> > calib_ac_type; typedef map<pair<string, int>, pair<string, NodeID> > calib_ac_t;
private: private:
const calib_var_type calib_var; const calib_var_t calib_var;
const calib_covar_type calib_covar; const calib_covar_t calib_covar;
const calib_ac_type calib_ac; const calib_ac_t calib_ac;
const SymbolTable &symbol_table; const SymbolTable &symbol_table;
public: public:
CalibVarStatement(const calib_var_type &calib_var_arg, CalibVarStatement(const calib_var_t &calib_var_arg,
const calib_covar_type &calib_covar_arg, const calib_covar_t &calib_covar_arg,
const calib_ac_type &calib_ac_arg, const calib_ac_t &calib_ac_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const; virtual void writeOutput(ostream &output, const string &basename) const;
}; };
...@@ -465,15 +465,15 @@ public: ...@@ -465,15 +465,15 @@ public:
class SvarIdentificationStatement : public Statement class SvarIdentificationStatement : public Statement
{ {
public: public:
typedef map<pair<int, int>, vector<int> > svar_identification_exclusion_type; typedef map<pair<int, int>, vector<int> > svar_identification_exclusion_t;
private: private:
const svar_identification_exclusion_type exclusion; const svar_identification_exclusion_t exclusion;
const bool upper_cholesky_present; const bool upper_cholesky_present;
const bool lower_cholesky_present; const bool lower_cholesky_present;
const SymbolTable &symbol_table; const SymbolTable &symbol_table;
int getMaxLag() const; int getMaxLag() const;
public: public:
SvarIdentificationStatement(const svar_identification_exclusion_type &exclusion_arg, SvarIdentificationStatement(const svar_identification_exclusion_t &exclusion_arg,
const bool &upper_cholesky_present_arg, const bool &upper_cholesky_present_arg,
const bool &lower_cholesky_present_arg, const bool &lower_cholesky_present_arg,
const SymbolTable &symbol_table_arg); const SymbolTable &symbol_table_arg);
......
...@@ -46,7 +46,7 @@ DataTree::DataTree(SymbolTable &symbol_table_arg, ...@@ -46,7 +46,7 @@ DataTree::DataTree(SymbolTable &symbol_table_arg,
DataTree::~DataTree() DataTree::~DataTree()
{ {
for (node_list_type::iterator it = node_list.begin(); it != node_list.end(); it++) for (node_list_t::iterator it = node_list.begin(); it != node_list.end(); it++)
delete *it; delete *it;
} }
...@@ -55,7 +55,7 @@ DataTree::AddNumConstant(const string &value) ...@@ -55,7 +55,7 @@ DataTree::AddNumConstant(const string &value)
{ {
int id = num_constants.AddConstant(value); int id = num_constants.AddConstant(value);
num_const_node_map_type::iterator it = num_const_node_map.find(id); num_const_node_map_t::iterator it = num_const_node_map.find(id);
if (it != num_const_node_map.end()) if (it != num_const_node_map.end())
return it->second; return it->second;
else else
...@@ -65,7 +65,7 @@ DataTree::AddNumConstant(const string &value) ...@@ -65,7 +65,7 @@ DataTree::AddNumConstant(const string &value)
VariableNode * VariableNode *
DataTree::AddVariableInternal(int symb_id, int lag) DataTree::AddVariableInternal(int symb_id, int lag)
{ {
variable_node_map_type::iterator it = variable_node_map.find(make_pair(symb_id, lag)); variable_node_map_t::iterator it = variable_node_map.find(make_pair(symb_id, lag));
if (it != variable_node_map.end()) if (it != variable_node_map.end())
return it->second; return it->second;
else else
...@@ -467,7 +467,7 @@ DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments) ...@@ -467,7 +467,7 @@ DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments)
{ {
assert(symbol_table.getType(symb_id) == eExternalFunction); assert(symbol_table.getType(symb_id) == eExternalFunction);
external_function_node_map_type::iterator it = external_function_node_map.find(make_pair(arguments, symb_id)); external_function_node_map_t::iterator it = external_function_node_map.find(make_pair(arguments, symb_id));
if (it != external_function_node_map.end()) if (it != external_function_node_map.end())
return it->second; return it->second;
...@@ -479,7 +479,7 @@ DataTree::AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector< ...@@ -479,7 +479,7 @@ DataTree::AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<
{ {
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction); assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
first_deriv_external_function_node_map_type::iterator it = first_deriv_external_function_node_map_t::iterator it =
first_deriv_external_function_node_map.find(make_pair(make_pair(arguments, input_index), first_deriv_external_function_node_map.find(make_pair(make_pair(arguments, input_index),
top_level_symb_id)); top_level_symb_id));
if (it != first_deriv_external_function_node_map.end()) if (it != first_deriv_external_function_node_map.end())
...@@ -493,7 +493,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector ...@@ -493,7 +493,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector
{ {
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction); assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
second_deriv_external_function_node_map_type::iterator it = second_deriv_external_function_node_map_t::iterator it =
second_deriv_external_function_node_map.find(make_pair(make_pair(arguments, second_deriv_external_function_node_map.find(make_pair(make_pair(arguments,
make_pair(input_index1, input_index2)), make_pair(input_index1, input_index2)),
top_level_symb_id)); top_level_symb_id));
...@@ -506,7 +506,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector ...@@ -506,7 +506,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector
bool bool
DataTree::isSymbolUsed(int symb_id) const DataTree::isSymbolUsed(int symb_id) const
{ {
for (variable_node_map_type::const_iterator it = variable_node_map.begin(); for (variable_node_map_t::const_iterator it = variable_node_map.begin();
it != variable_node_map.end(); it++) it != variable_node_map.end(); it++)
if (it->first.first == symb_id) if (it->first.first == symb_id)
return true; return true;
...@@ -532,7 +532,7 @@ DataTree::getDynJacobianCol(int deriv_id) const throw (UnknownDerivIDException) ...@@ -532,7 +532,7 @@ DataTree::getDynJacobianCol(int deriv_id) const throw (UnknownDerivIDException)
bool bool
DataTree::isUnaryOpUsed(UnaryOpcode opcode) const DataTree::isUnaryOpUsed(UnaryOpcode opcode) const
{ {