preprocessor: remove resetDataTree method

issue#70
Houtan Bastani 2015-04-15 16:16:26 +02:00
parent cb1fb288f4
commit e045d42c12
4 changed files with 8 additions and 16 deletions

View File

@ -3429,18 +3429,6 @@ DynamicModel::writeDynamicFile(const string &basename, bool block, bool bytecode
writeDynamicMFile(t_basename);
}
void
DynamicModel::resetDataTree()
{
variable_node_map.clear();
unary_op_node_map.clear();
binary_op_node_map.clear();
trinary_op_node_map.clear();
external_function_node_map.clear();
first_deriv_external_function_node_map.clear();
second_deriv_external_function_node_map.clear();
}
void
DynamicModel::cloneDynamic(DynamicModel &dynamic_model) const
{

View File

@ -235,9 +235,6 @@ public:
/*! It assumes that the dynamic model given in argument has just been allocated */
void cloneDynamic(DynamicModel &dynamic_model) const;
//! reset DataTree vars
void resetDataTree();
//! Replaces model equations with derivatives of Lagrangian w.r.t. endogenous
void computeRamseyPolicyFOCs(const StaticModel &static_model);
//! Replaces the model equations in dynamic_model with those in this model

View File

@ -313,7 +313,6 @@ ModFile::transformPass(bool nostrict)
{
SymbolTable orig_symbol_table = symbol_table;
symbol_table.rmExo(unusedExo);
dynamic_model.resetDataTree();
dynamic_model.reindex(orig_symbol_table);
vector<Statement *> orig_statements = statements;
statements.clear();

View File

@ -1416,6 +1416,14 @@ ModelTree::addAuxEquation(expr_t eq)
void
ModelTree::reindex(SymbolTable &orig_symbol_table)
{
variable_node_map.clear();
unary_op_node_map.clear();
binary_op_node_map.clear();
trinary_op_node_map.clear();
external_function_node_map.clear();
first_deriv_external_function_node_map.clear();
second_deriv_external_function_node_map.clear();
reindexEquations(orig_symbol_table);
reindexTrendSymbolsMap(orig_symbol_table);
reindexNonstationarySymbolsMap(orig_symbol_table);