Commit c8fdd5d9 authored by Sébastien Villemot's avatar Sébastien Villemot

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

parent c3c8fa5c
......@@ -999,7 +999,7 @@ public:
};
#ifdef BYTE_CODE
typedef vector<pair<Tags, void * > > tags_liste_type;
typedef vector<pair<Tags, void * > > tags_liste_t;
class CodeLoad
{
private:
......@@ -1017,10 +1017,10 @@ public:
{
return code;
};
inline tags_liste_type
inline tags_liste_t
get_op_code(string file_name)
{
tags_liste_type tags_liste;
tags_liste_t tags_liste;
ifstream CompiledCode;
streamoff Code_Size;
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)
mod_file_struct.stoch_simul_present = true;
// 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())
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)
/* Fill in option_order of mod_file_struct
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 */
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())
{
int order = atoi(it->second.c_str());
......@@ -222,7 +222,7 @@ EstimationStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.estimation_present = true;
// 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())
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)
mod_file_struct.dsge_var_calibrated = it->second;
// 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())
mod_file_struct.dsge_var_estimated = true;
......@@ -280,7 +280,7 @@ DynareSensitivityStatement::DynareSensitivityStatement(const OptionsList &option
void
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()
&& it->second == "1")
mod_file_struct.identification_present = true;
......@@ -366,8 +366,8 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct)
if (it->prior == "1") //BETA_PDF is associated with "1" in DynareBison.yy
try
{
if (it->mean->eval(eval_context_type()) == 0.5 &&
it->std->eval(eval_context_type()) == 0.5)
if (it->mean->eval(eval_context_t()) == 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;
exit(EXIT_FAILURE);
......@@ -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) :
trend_elements(trend_elements_arg),
symbol_table(symbol_table_arg)
......@@ -598,7 +598,7 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename)
{
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++)
{
......@@ -615,9 +615,9 @@ ObservationTrendsStatement::writeOutput(ostream &output, const string &basename)
}
}
CalibVarStatement::CalibVarStatement(const calib_var_type &calib_var_arg,
const calib_covar_type &calib_covar_arg,
const calib_ac_type &calib_ac_arg,
CalibVarStatement::CalibVarStatement(const calib_var_t &calib_var_arg,
const calib_covar_t &calib_covar_arg,
const calib_ac_t &calib_ac_arg,
const SymbolTable &symbol_table_arg) :
calib_var(calib_var_arg),
calib_covar(calib_covar_arg),
......@@ -642,7 +642,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
}
// 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++)
{
const string &name = it->first;
......@@ -669,7 +669,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
}
// 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++)
{
const string &name1 = it->first.first;
......@@ -700,7 +700,7 @@ CalibVarStatement::writeOutput(ostream &output, const string &basename) const
// Print calibration autocorrelations
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++)
{
const string &name = it->first.first;
......@@ -764,7 +764,7 @@ OsrStatement::checkPass(ModFileStructure &mod_file_struct)
mod_file_struct.osr_present = true;
// 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())
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
output << "osr(var_list_,osr_params_,obj_var_,optim_weights_);\n";
}
OptimWeightsStatement::OptimWeightsStatement(const var_weights_type &var_weights_arg,
const covar_weights_type &covar_weights_arg,
OptimWeightsStatement::OptimWeightsStatement(const var_weights_t &var_weights_arg,
const covar_weights_t &covar_weights_arg,
const SymbolTable &symbol_table_arg) :
var_weights(var_weights_arg),
covar_weights(covar_weights_arg),
......@@ -806,7 +806,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons
<< "optim_weights_ = sparse(M_.endo_nbr,M_.endo_nbr);" << 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++)
{
const string &name = it->first;
......@@ -818,7 +818,7 @@ OptimWeightsStatement::writeOutput(ostream &output, const string &basename) cons
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++)
{
const string &name1 = it->first.first;
......@@ -863,7 +863,7 @@ DynaTypeStatement::writeOutput(ostream &output, const string &basename) const
<< "',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) :
filename_list(filename_list_arg),
options_list(options_list_arg)
......@@ -878,7 +878,7 @@ ModelComparisonStatement::writeOutput(ostream &output, const string &basename) c
output << "ModelNames_ = {};" << 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++)
{
output << "ModelNames_ = { ModelNames_{:} '" << (*it).first << "'};" << endl;
......@@ -906,7 +906,7 @@ PlannerObjectiveStatement::checkPass(ModFileStructure &mod_file_struct)
void
PlannerObjectiveStatement::computingPass()
{
model_tree->computingPass(eval_context_type(), false, true, false, false);
model_tree->computingPass(eval_context_t(), false, true, false, false);
}
void
......@@ -1072,7 +1072,7 @@ PlotConditionalForecastStatement::writeOutput(ostream &output, const string &bas
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 &lower_cholesky_present_arg,
const SymbolTable &symbol_table_arg) :
......@@ -1087,7 +1087,7 @@ int
SvarIdentificationStatement::getMaxLag() const
{
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)
max_lag = it->first.first;
......@@ -1151,7 +1151,7 @@ SvarIdentificationStatement::writeOutput(ostream &output, const string &basename
output << "options_.ms.Qi = zeros(" << n << ", " << n << ", " << 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++)
{
......@@ -1197,7 +1197,7 @@ MarkovSwitchingStatement::MarkovSwitchingStatement(const OptionsList &options_li
void
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");
if (itChain == options_list.num_options.end())
......@@ -1237,8 +1237,8 @@ SvarStatement::SvarStatement(const OptionsList &options_list_arg) :
void
SvarStatement::writeOutput(ostream &output, const string &basename) const
{
OptionsList::num_options_type::const_iterator it0, it1, it2;
OptionsList::vec_int_options_type::const_iterator itv;
OptionsList::num_options_t::const_iterator it0, it1, it2;
OptionsList::vec_int_options_t::const_iterator itv;
it0 = options_list.num_options.find("ms.chain");
if (it0 != options_list.num_options.end())
......
......@@ -169,12 +169,12 @@ public:
class ObservationTrendsStatement : public Statement
{
public:
typedef map<string, NodeID> trend_elements_type;
typedef map<string, NodeID> trend_elements_t;
private:
const trend_elements_type trend_elements;
const trend_elements_t trend_elements;
const SymbolTable &symbol_table;
public:
ObservationTrendsStatement(const trend_elements_type &trend_elements_arg,
ObservationTrendsStatement(const trend_elements_t &trend_elements_arg,
const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -225,12 +225,12 @@ public:
class ModelComparisonStatement : public Statement
{
public:
typedef vector<pair<string, string> > filename_list_type;
typedef vector<pair<string, string> > filename_list_t;
private:
filename_list_type filename_list;
filename_list_t filename_list;
OptionsList options_list;
public:
ModelComparisonStatement(const filename_list_type &filename_list_arg,
ModelComparisonStatement(const filename_list_t &filename_list_arg,
const OptionsList &options_list_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -298,15 +298,15 @@ public:
class OptimWeightsStatement : public Statement
{
public:
typedef map<string, NodeID> var_weights_type;
typedef map<pair<string, string>, NodeID> covar_weights_type;
typedef map<string, NodeID> var_weights_t;
typedef map<pair<string, string>, NodeID> covar_weights_t;
private:
const var_weights_type var_weights;
const covar_weights_type covar_weights;
const var_weights_t var_weights;
const covar_weights_t covar_weights;
const SymbolTable &symbol_table;
public:
OptimWeightsStatement(const var_weights_type &var_weights_arg,
const covar_weights_type &covar_weights_arg,
OptimWeightsStatement(const var_weights_t &var_weights_arg,
const covar_weights_t &covar_weights_arg,
const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -324,20 +324,20 @@ class CalibVarStatement : public Statement
{
public:
//! 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)
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)
typedef map<pair<string, int>, pair<string, NodeID> > calib_ac_type;
typedef map<pair<string, int>, pair<string, NodeID> > calib_ac_t;
private:
const calib_var_type calib_var;
const calib_covar_type calib_covar;
const calib_ac_type calib_ac;
const calib_var_t calib_var;
const calib_covar_t calib_covar;
const calib_ac_t calib_ac;
const SymbolTable &symbol_table;
public:
CalibVarStatement(const calib_var_type &calib_var_arg,
const calib_covar_type &calib_covar_arg,
const calib_ac_type &calib_ac_arg,
CalibVarStatement(const calib_var_t &calib_var_arg,
const calib_covar_t &calib_covar_arg,
const calib_ac_t &calib_ac_arg,
const SymbolTable &symbol_table_arg);
virtual void writeOutput(ostream &output, const string &basename) const;
};
......@@ -465,15 +465,15 @@ public:
class SvarIdentificationStatement : public Statement
{
public:
typedef map<pair<int, int>, vector<int> > svar_identification_exclusion_type;
typedef map<pair<int, int>, vector<int> > svar_identification_exclusion_t;
private:
const svar_identification_exclusion_type exclusion;
const svar_identification_exclusion_t exclusion;
const bool upper_cholesky_present;
const bool lower_cholesky_present;
const SymbolTable &symbol_table;
int getMaxLag() const;
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 &lower_cholesky_present_arg,
const SymbolTable &symbol_table_arg);
......
......@@ -46,7 +46,7 @@ DataTree::DataTree(SymbolTable &symbol_table_arg,
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;
}
......@@ -55,7 +55,7 @@ DataTree::AddNumConstant(const string &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())
return it->second;
else
......@@ -65,7 +65,7 @@ DataTree::AddNumConstant(const string &value)
VariableNode *
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())
return it->second;
else
......@@ -467,7 +467,7 @@ DataTree::AddExternalFunction(int symb_id, const vector<NodeID> &arguments)
{
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())
return it->second;
......@@ -479,7 +479,7 @@ DataTree::AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<
{
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),
top_level_symb_id));
if (it != first_deriv_external_function_node_map.end())
......@@ -493,7 +493,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector
{
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,
make_pair(input_index1, input_index2)),
top_level_symb_id));
......@@ -506,7 +506,7 @@ DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector
bool
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++)
if (it->first.first == symb_id)
return true;
......@@ -532,7 +532,7 @@ DataTree::getDynJacobianCol(int deriv_id) const throw (UnknownDerivIDException)
bool
DataTree::isUnaryOpUsed(UnaryOpcode opcode) const
{
for (unary_op_node_map_type::const_iterator it = unary_op_node_map.begin();
for (unary_op_node_map_t::const_iterator it = unary_op_node_map.begin();
it != unary_op_node_map.end(); it++)
if (it->first.second == opcode)
return true;
......@@ -543,7 +543,7 @@ DataTree::isUnaryOpUsed(UnaryOpcode opcode) const
bool
DataTree::isBinaryOpUsed(BinaryOpcode opcode) const
{
for (binary_op_node_map_type::const_iterator it = binary_op_node_map.begin();
for (binary_op_node_map_t::const_iterator it = binary_op_node_map.begin();
it != binary_op_node_map.end(); it++)
if (it->first.second == opcode)
return true;
......@@ -554,7 +554,7 @@ DataTree::isBinaryOpUsed(BinaryOpcode opcode) const
bool
DataTree::isTrinaryOpUsed(TrinaryOpcode opcode) const
{
for (trinary_op_node_map_type::const_iterator it = trinary_op_node_map.begin();
for (trinary_op_node_map_t::const_iterator it = trinary_op_node_map.begin();
it != trinary_op_node_map.end(); it++)
if (it->first.second == opcode)
return true;
......@@ -565,7 +565,7 @@ DataTree::isTrinaryOpUsed(TrinaryOpcode opcode) const
bool
DataTree::isExternalFunctionUsed(int symb_id) const
{
for (external_function_node_map_type::const_iterator it = external_function_node_map.begin();
for (external_function_node_map_t::const_iterator it = external_function_node_map.begin();
it != external_function_node_map.end(); it++)
if (it->first.second == symb_id)
return true;
......@@ -576,7 +576,7 @@ DataTree::isExternalFunctionUsed(int symb_id) const
bool
DataTree::isFirstDerivExternalFunctionUsed(int symb_id) const
{
for (first_deriv_external_function_node_map_type::const_iterator it = first_deriv_external_function_node_map.begin();
for (first_deriv_external_function_node_map_t::const_iterator it = first_deriv_external_function_node_map.begin();
it != first_deriv_external_function_node_map.end(); it++)
if (it->first.second == symb_id)
return true;
......@@ -587,7 +587,7 @@ DataTree::isFirstDerivExternalFunctionUsed(int symb_id) const
bool
DataTree::isSecondDerivExternalFunctionUsed(int symb_id) const
{
for (second_deriv_external_function_node_map_type::const_iterator it = second_deriv_external_function_node_map.begin();
for (second_deriv_external_function_node_map_t::const_iterator it = second_deriv_external_function_node_map.begin();
it != second_deriv_external_function_node_map.end(); it++)
if (it->first.second == symb_id)
return true;
......
......@@ -54,23 +54,23 @@ protected:
//! A reference to the external functions table
ExternalFunctionsTable &external_functions_table;
typedef map<int, NumConstNode *> num_const_node_map_type;
num_const_node_map_type num_const_node_map;
typedef map<int, NumConstNode *> num_const_node_map_t;
num_const_node_map_t num_const_node_map;
//! Pair (symbol_id, lag) used as key
typedef map<pair<int, int>, VariableNode *> variable_node_map_type;
variable_node_map_type variable_node_map;
typedef map<pair<NodeID, UnaryOpcode>, UnaryOpNode *> unary_op_node_map_type;
unary_op_node_map_type unary_op_node_map;
typedef map<pair<pair<NodeID, NodeID>, BinaryOpcode>, BinaryOpNode *> binary_op_node_map_type;
binary_op_node_map_type binary_op_node_map;
typedef map<pair<pair<pair<NodeID, NodeID>, NodeID>, TrinaryOpcode>, TrinaryOpNode *> trinary_op_node_map_type;
trinary_op_node_map_type trinary_op_node_map;
typedef map<pair<vector<NodeID>, int>, ExternalFunctionNode *> external_function_node_map_type;
external_function_node_map_type external_function_node_map;
typedef map<pair<pair<vector<NodeID>, int>, int>, FirstDerivExternalFunctionNode *> first_deriv_external_function_node_map_type;
first_deriv_external_function_node_map_type first_deriv_external_function_node_map;
typedef map<pair<pair<vector<NodeID>, pair<int, int> >, int>, SecondDerivExternalFunctionNode *> second_deriv_external_function_node_map_type;
second_deriv_external_function_node_map_type second_deriv_external_function_node_map;
typedef map<pair<int, int>, VariableNode *> variable_node_map_t;
variable_node_map_t variable_node_map;
typedef map<pair<NodeID, UnaryOpcode>, UnaryOpNode *> unary_op_node_map_t;
unary_op_node_map_t unary_op_node_map;
typedef map<pair<pair<NodeID, NodeID>, BinaryOpcode>, BinaryOpNode *> binary_op_node_map_t;
binary_op_node_map_t binary_op_node_map;
typedef map<pair<pair<pair<NodeID, NodeID>, NodeID>, TrinaryOpcode>, TrinaryOpNode *> trinary_op_node_map_t;
trinary_op_node_map_t trinary_op_node_map;
typedef map<pair<vector<NodeID>, int>, ExternalFunctionNode *> external_function_node_map_t;
external_function_node_map_t external_function_node_map;
typedef map<pair<pair<vector<NodeID>, int>, int>, FirstDerivExternalFunctionNode *> first_deriv_external_function_node_map_t;
first_deriv_external_function_node_map_t first_deriv_external_function_node_map;
typedef map<pair<pair<vector<NodeID>, 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)
map<int, NodeID> local_variables_table;
......@@ -79,9 +79,9 @@ protected:
VariableNode *AddVariableInternal(int symb_id, int lag);
private:
typedef list<NodeID> node_list_type;
typedef list<NodeID> node_list_t;
//! The list of nodes
node_list_type node_list;
node_list_t node_list;
//! A counter for filling ExprNode's idx field
int node_counter;
......@@ -250,7 +250,7 @@ inline NodeID
DataTree::AddUnaryOp(UnaryOpcode op_code, NodeID arg, int arg_exp_info_set, const string &arg_exp_info_set_name)
{
// If the node already exists in tree, share it
unary_op_node_map_type::iterator it = unary_op_node_map.find(make_pair(arg, op_code));
unary_op_node_map_t::iterator it = unary_op_node_map.find(make_pair(arg, op_code));
if (it != unary_op_node_map.end())
return it->second;
......@@ -261,7 +261,7 @@ DataTree::AddUnaryOp(UnaryOpcode op_code, NodeID arg, int arg_exp_info_set, cons
{
try
{
double argval = arg->eval(eval_context_type());
double argval = arg->eval(eval_context_t());
double val = UnaryOpNode::eval_opcode(op_code, argval);
return AddPossiblyNegativeConstant(val);
}
......@@ -275,15 +275,15 @@ DataTree::AddUnaryOp(UnaryOpcode op_code, NodeID arg, int arg_exp_info_set, cons
inline NodeID
DataTree::AddBinaryOp(NodeID arg1, BinaryOpcode op_code, NodeID arg2)
{
binary_op_node_map_type::iterator it = binary_op_node_map.find(make_pair(make_pair(arg1, arg2), op_code));
binary_op_node_map_t::iterator it = binary_op_node_map.find(make_pair(make_pair(arg1, arg2), op_code));
if (it != binary_op_node_map.end())
return it->second;
// Try to reduce to a constant
try
{
double argval1 = arg1->eval(eval_context_type());
double argval2 = arg2->eval(eval_context_type());
double argval1 = arg1->eval(eval_context_t());
double argval2 = arg2->eval(eval_context_t());
double val = BinaryOpNode::eval_opcode(argval1, op_code, argval2);
return AddPossiblyNegativeConstant(val);
}
......@@ -296,16 +296,16 @@ DataTree::AddBinaryOp(NodeID arg1, BinaryOpcode op_code, NodeID arg2)
inline NodeID
DataTree::AddTrinaryOp(NodeID arg1, TrinaryOpcode op_code, NodeID arg2, NodeID arg3)
{
trinary_op_node_map_type::iterator it = trinary_op_node_map.find(make_pair(make_pair(make_pair(arg1, arg2), arg3), op_code));
trinary_op_node_map_t::iterator it = trinary_op_node_map.find(make_pair(make_pair(make_pair(arg1, arg2), arg3), op_code));
if (it != trinary_op_node_map.end())
return it->second;
// Try to reduce to a constant
try
{
double argval1 = arg1->eval(eval_context_type());
double argval2 = arg2->eval(eval_context_type());
double argval3 = arg3->eval(eval_context_type());
double argval1 = arg1->eval(eval_context_t());
double argval2 = arg2->eval(eval_context_t());
double argval3 = arg3->eval(eval_context_t());
double val = TrinaryOpNode::eval_opcode(argval1, op_code, argval2, argval3);
return AddPossiblyNegativeConstant(val);
}
......
This diff is collapsed.
......@@ -62,47 +62,47 @@ private:
Only non-null derivatives are stored in the map.
Parameter indices are those of the getDerivID() method.
*/
first_derivatives_type residuals_params_derivatives;
first_derivatives_t residuals_params_derivatives;
//! Second derivatives of the residuals w.r. to parameters
/*! First index is equation number, second and third indeces are parameters.
Only non-null derivatives are stored in the map.
Parameter indices are those of the getDerivID() method.
*/
second_derivatives_type residuals_params_second_derivatives;
second_derivatives_t residuals_params_second_derivatives;
//! Derivatives of the jacobian w.r. to parameters
/*! First index is equation number, second is endo/exo/exo_det variable, and third is parameter.
Only non-null derivatives are stored in the map.
Variable and parameter indices are those of the getDerivID() method.
*/
second_derivatives_type jacobian_params_derivatives;
second_derivatives_t jacobian_params_derivatives;
//! Second derivatives of the jacobian w.r. to parameters
/*! First index is equation number, second is endo/exo/exo_det variable, and third and fourth are parameters.
Only non-null derivatives are stored in the map.
Variable and parameter indices are those of the getDerivID() method.
*/
third_derivatives_type jacobian_params_second_derivatives;
third_derivatives_t jacobian_params_second_derivatives;
//! Derivatives of the hessian w.r. to parameters
/*! First index is equation number, first and second are endo/exo/exo_det variable, and third is parameter.
Only non-null derivatives are stored in the map.
Variable and parameter indices are those of the getDerivID() method.
*/
third_derivatives_type hessian_params_derivatives;
third_derivatives_t hessian_params_derivatives;
//! Temporary terms for the file containing parameters dervicatives
temporary_terms_type params_derivs_temporary_terms;
temporary_terms_t params_derivs_temporary_terms;
//! Temporary terms for block decomposed models
vector< vector<temporary_terms_type> > v_temporary_terms;
vector< vector<temporary_terms_t> > v_temporary_terms;
vector<temporary_terms_inuse_type> v_temporary_terms_inuse;