Go to the documentation of this file.
15 #ifndef EXPRESSIONTREE_H
16 #define EXPRESSIONTREE_H
195 double m_dTreeRootValue;
289 double calculateFunction(
double *x,
bool new_x);
~ScalarExpressionTree()
default destructor.
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,...
Used to hold the instance in memory.
OSnLNode * m_treeRoot
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
double calculateFunction(double *x, bool new_x)
Calculate the expression tree function value given the current variable values using the calculateFun...
A generic class from which we derive both OSnLNode and OSnLMNode.
The OSnLMNode Class for nonlinear expressions involving matrices.
ScalarExpressionTree()
default constructor.
std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix f...
bool m_bIndexMapGenerated
Retrieve a map of the indices of the variables that are in the expression tree.
bool IsEqual(OSExpressionTree *that)
A function to check for the equality of two objects.
~MatrixExpressionTree()
default destructor.
The OSnLNode Class for nonlinear expressions.
bool bADMustReTape
is true if an AD Expression Tree has an expression that can change depending on the value of the inpu...
Used to hold the instance in memory.
bool IsEqual(ScalarExpressionTree *that)
A function to check for the equality of two objects.
bool IsEqual(MatrixExpressionTree *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 destructor.
OSExpressionTree()
default constructor.
MatrixExpressionTree()
default constructor.
bool bDestroyNlNodes
m_bDestroyNlNodes is true if the destructor deletes the nodes in the Expression tree
std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix ...
std::vector< ExprNode * > getPrefixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix f...
std::vector< ExprNode * > getPostfixFromExpressionTree()
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix ...
Used to hold part of the instance in memory.
This file defines the OSnLNode class along with its derived classes.