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

Cosmetic renaming for consistency between DataTree method names.

parent 140db861
/*
* Copyright (C) 2003-2012 Dynare Team
* Copyright (C) 2003-2014 Dynare Team
*
* This file is part of Dynare.
*
......@@ -512,7 +512,7 @@ DataTree::AddExternalFunction(int symb_id, const vector<expr_t> &arguments)
}
expr_t
DataTree::AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<expr_t> &arguments, int input_index)
DataTree::AddFirstDerivExternalFunction(int top_level_symb_id, const vector<expr_t> &arguments, int input_index)
{
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
......@@ -526,7 +526,7 @@ DataTree::AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<
}
expr_t
DataTree::AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector<expr_t> &arguments, int input_index1, int input_index2)
DataTree::AddSecondDerivExternalFunction(int top_level_symb_id, const vector<expr_t> &arguments, int input_index1, int input_index2)
{
assert(symbol_table.getType(top_level_symb_id) == eExternalFunction);
......
......@@ -208,9 +208,9 @@ public:
//! Adds an external function node
expr_t AddExternalFunction(int symb_id, const vector<expr_t> &arguments);
//! Adds an external function node for the first derivative of an external function
expr_t AddFirstDerivExternalFunctionNode(int top_level_symb_id, const vector<expr_t> &arguments, int input_index);
expr_t AddFirstDerivExternalFunction(int top_level_symb_id, const vector<expr_t> &arguments, int input_index);
//! Adds an external function node for the second derivative of an external function
expr_t AddSecondDerivExternalFunctionNode(int top_level_symb_id, const vector<expr_t> &arguments, int input_index1, int input_index2);
expr_t AddSecondDerivExternalFunction(int top_level_symb_id, const vector<expr_t> &arguments, int input_index1, int input_index2);
//! Checks if a given symbol is used somewhere in the data tree
bool isSymbolUsed(int symb_id) const;
//! Checks if a given unary op is used somewhere in the data tree
......
......@@ -4321,7 +4321,7 @@ ExternalFunctionNode::composeDerivatives(const vector<expr_t> &dargs)
vector<expr_t> dNodes;
for (int i = 0; i < (int) dargs.size(); i++)
dNodes.push_back(datatree.AddTimes(dargs.at(i),
datatree.AddFirstDerivExternalFunctionNode(symb_id, arguments, i+1)));
datatree.AddFirstDerivExternalFunction(symb_id, arguments, i+1)));
expr_t theDeriv = datatree.Zero;
for (vector<expr_t>::const_iterator it = dNodes.begin(); it != dNodes.end(); it++)
......@@ -4911,7 +4911,7 @@ FirstDerivExternalFunctionNode::composeDerivatives(const vector<expr_t> &dargs)
vector<expr_t> dNodes;
for (int i = 0; i < (int) dargs.size(); i++)
dNodes.push_back(datatree.AddTimes(dargs.at(i),
datatree.AddSecondDerivExternalFunctionNode(symb_id, arguments, inputIndex, i+1)));
datatree.AddSecondDerivExternalFunction(symb_id, arguments, inputIndex, i+1)));
expr_t theDeriv = datatree.Zero;
for (vector<expr_t>::const_iterator it = dNodes.begin(); it != dNodes.end(); it++)
theDeriv = datatree.AddPlus(theDeriv, *it);
......@@ -5147,8 +5147,8 @@ FirstDerivExternalFunctionNode::cloneDynamic(DataTree &dynamic_datatree) const
for (vector<expr_t>::const_iterator it = arguments.begin();
it != arguments.end(); it++)
dynamic_arguments.push_back((*it)->cloneDynamic(dynamic_datatree));
return dynamic_datatree.AddFirstDerivExternalFunctionNode(symb_id, dynamic_arguments,
inputIndex);
return dynamic_datatree.AddFirstDerivExternalFunction(symb_id, dynamic_arguments,
inputIndex);
}
SecondDerivExternalFunctionNode::SecondDerivExternalFunctionNode(DataTree &datatree_arg,
......@@ -5355,6 +5355,6 @@ SecondDerivExternalFunctionNode::cloneDynamic(DataTree &dynamic_datatree) const
for (vector<expr_t>::const_iterator it = arguments.begin();
it != arguments.end(); it++)
dynamic_arguments.push_back((*it)->cloneDynamic(dynamic_datatree));
return dynamic_datatree.AddSecondDerivExternalFunctionNode(symb_id, dynamic_arguments,
inputIndex1, inputIndex2);
return dynamic_datatree.AddSecondDerivExternalFunction(symb_id, dynamic_arguments,
inputIndex1, inputIndex2);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment