15 #ifndef EXPRESSIONTREE_H 16 #define EXPRESSIONTREE_H 131 std::vector<ExprNode*> getPrefixFromExpressionTree();
141 std::vector<ExprNode*> getPostfixFromExpressionTree();
151 std::map<int, int> *getVariableIndicesMap();
182 double calculateFunction(
double *x,
bool new_x);
195 double m_dTreeRootValue;
239 std::vector<ExprNode*> getPrefixFromExpressionTree();
249 std::vector<ExprNode*> getPostfixFromExpressionTree();
289 double calculateFunction(
double *x,
bool new_x);
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
Used to hold the instance in memory.
bool m_bIndexMapGenerated
Retrieve a map of the indices of the variables that are in the expression tree.
The OSnLMNode Class for nonlinear expressions involving matrices.
OSExpressionTree()
default constructor.
~OSExpressionTree()
default destructor.
bool IsEqual(OSExpressionTree *that)
A function to check for the equality of two objects.
bool bDestroyNlNodes
m_bDestroyNlNodes is true if the destructor deletes the nodes in the Expression tree ...
Used to hold part of the instance in memory.
Used to hold the instance in memory.
A generic class from which we derive both OSnLNode and OSnLMNode.
This file defines the OSnLNode class along with its derived classes.
OSnLMNode * m_treeRoot
m_treeRoot holds the root node (of OSnLMNode type) of the expression tree.
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; ...
bool bADMustReTape
is true if an AD Expression Tree has an expression that can change depending on the value of the inpu...
The OSnLNode Class for nonlinear expressions.