25 m_bIndexMapGenerated( false),
26 bADMustReTape( false),
27 bDestroyNlNodes( true)
36 "Inside the OSExpressionTree Destructor");
51 std::vector<ExprNode*> OSExpressionTree::getPrefixFromExpressionTree()
53 return m_treeRoot->getPrefixFromExpressionTree();
57 std::vector<ExprNode*> OSExpressionTree::getPostfixFromExpressionTree()
59 return m_treeRoot->getPostfixFromExpressionTree();
64 double OSExpressionTree::calculateFunction(
double *
x,
bool new_x)
69 return m_dTreeRootValue;
73 m_dTreeRootValue = m_treeRoot->calculateFunction( x);
74 return m_dTreeRootValue;
124 "Inside the ScalarExpressionTree Constructor");
133 "Inside the ScalarExpressionTree Destructor");
158 std::map<int, int>::iterator m_mPosVarIdx;
222 "Inside the MatrixExpressionTree Constructor");
231 "Inside the MatrixExpressionTree Destructor");
std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix ...
const OSSmartPtr< OSOutput > osoutput
bool bDestroyNlNodes
m_bDestroyNlNodes is true if the destructor deletes the nodes in the Expression tree ...
virtual std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to the expression tree in postfix format...
virtual void getVariableIndexMap(std::map< int, int > *varIdx)
varIdx is a map where the key is the index of an OSnLNodeVariable and (*varIdx)[ idx] is the kth vari...
std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix ...
~OSExpressionTree()
default destructor.
bool IsEqual(OSExpressionTree *that)
A function to check for the equality of two objects.
std::map< int, int > * getVariableIndicesMap()
Retrieve a map of the indices of the variables that are in the expression tree.
OSExpressionTree()
default constructor.
bool m_bIndexMapGenerated
Retrieve a map of the indices of the variables that are in the expression tree.
~ScalarExpressionTree()
default destructor.
double calculateFunction(double *x, bool new_x)
Calculate the expression tree function value given the current variable values using the calculateFun...
Used to hold part of the instance in memory.
std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix f...
bool IsEqual(MatrixExpressionTree *that)
A function to check for the equality of two objects.
double m_dTreeRootValue
A function to make a deep copy of an instance of this class.
bool bADMustReTape
is true if an AD Expression Tree has an expression that can change depending on the value of the inpu...
ScalarExpressionTree()
default constructor.
bool IsEqual(ScalarExpressionTree *that)
A function to check for the equality of two objects.
~MatrixExpressionTree()
default destructor.
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to OSnLNodes and OSnLMNodes that correspond to the (matrix-valued) expressio...
OSnLMNode * m_treeRoot
m_treeRoot holds the root node (of OSnLMNode type) of the expression tree.
std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix f...
bool IsEqual(OSnLMNode *that)
A function to check for the equality of two objects.
MatrixExpressionTree()
default constructor.
bool IsEqual(OSnLNode *that)
A function to check for the equality of two objects.
std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to the expression tree in postfix format...
Used to hold the instance in memory.
virtual std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to OSnLNodes and OSnLMNodes that correspond to the (scalar-valued or matrix-...
std::map< int, int > * mapVarIdx
m_mapVarIdx is a map used to generate the infix expression for AD the key is idx, a variable number; ...
Used to hold the instance in memory.
virtual double calculateFunction(double *x)=0
Calculate the function value given the current variable values.
void fint fint fint real fint real * x