Used to hold part of the instance in memory. More...
#include <OSExpressionTree.h>


Public Member Functions | |
| ScalarExpressionTree () | |
| default constructor. | |
| ~ScalarExpressionTree () | |
| default destructor. | |
| bool | IsEqual (ScalarExpressionTree *that) |
| A function to check for the equality of two objects. | |
| std::vector< ExprNode * > | getPrefixFromExpressionTree () |
| Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix format. | |
| std::vector< ExprNode * > | getPostfixFromExpressionTree () |
| Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix format. | |
| std::map< int, int > * | getVariableIndicesMap () |
| Retrieve a map of the indices of the variables that are in the expression tree. | |
| double | calculateFunction (double *x, bool new_x) |
| Calculate the expression tree function value given the current variable values using the calculateFunction method of OSnLNode. | |
Public Attributes | |
| OSnLNode * | m_treeRoot |
| m_treeRoot holds the root node (of OSnLNode type) of the expression tree. | |
Private Attributes | |
| double | m_dTreeRootValue |
| A function to make a deep copy of an instance of this class. | |
Used to hold part of the instance in memory.
Definition at line 99 of file OSExpressionTree.h.
| ScalarExpressionTree::ScalarExpressionTree | ( | ) |
default constructor.
Definition at line 119 of file OSExpressionTree.cpp.
| ScalarExpressionTree::~ScalarExpressionTree | ( | ) |
default destructor.
Definition at line 129 of file OSExpressionTree.cpp.
| bool ScalarExpressionTree::IsEqual | ( | ScalarExpressionTree * | that | ) |
A function to check for the equality of two objects.
Reimplemented from OSExpressionTree.
Definition at line 180 of file OSExpressionTree.cpp.
| std::vector< ExprNode * > ScalarExpressionTree::getPrefixFromExpressionTree | ( | ) |
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in prefix format.
Definition at line 142 of file OSExpressionTree.cpp.
| std::vector< ExprNode * > ScalarExpressionTree::getPostfixFromExpressionTree | ( | ) |
Get a vector of pointers to ExprNodes that correspond to a scalar-valued OSExpressionTree in postfix format.
Definition at line 148 of file OSExpressionTree.cpp.
| std::map< int, int > * ScalarExpressionTree::getVariableIndicesMap | ( | ) |
Retrieve a map of the indices of the variables that are in the expression tree.
Definition at line 154 of file OSExpressionTree.cpp.
| double ScalarExpressionTree::calculateFunction | ( | double * | x, | |
| bool | new_x | |||
| ) |
Calculate the expression tree function value given the current variable values using the calculateFunction method of OSnLNode.
If the function has been calculated, the method will retrieve it.
| x | holds the values of the variables in a double array. | |
| new_x | is false if any evaluation method was previously called for the current x |
Definition at line 165 of file OSExpressionTree.cpp.
m_treeRoot holds the root node (of OSnLNode type) of the expression tree.
Definition at line 106 of file OSExpressionTree.h.
double ScalarExpressionTree::m_dTreeRootValue [private] |
A function to make a deep copy of an instance of this class.
| that,: | the instance from which information is to be copied |
Definition at line 195 of file OSExpressionTree.h.
1.6.1