com.graphbuilder.math.PowNode Class Reference

A node of an expression tree, represented by the symbol "^". More...

Inheritance diagram for com.graphbuilder.math.PowNode:
Inheritance graph
[legend]
Collaboration diagram for com.graphbuilder.math.PowNode:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PowNode (Expression leftChild, Expression rightChild)
double eval (VarMap v, FuncMap f)
 Raises the evaluation of the left side to the power of the evaluation of the right side and returns the result.
String getSymbol ()
 Returns the text symbol that represents the operation.
void setLeftChild (Expression x)
void setRightChild (Expression x)
Expression getLeftChild ()
Expression getRightChild ()
boolean isDescendent (Expression x)
 Returns true if this node is a descendent of the specified node, false otherwise.
Expression getParent ()
 Returns the parent of this node.
String[] getVariableNames ()
 Returns an array of exact length of the variable names contained in the expression tree rooted at this node.
String[] getFunctionNames ()
 Returns an array of exact length of the function names contained in the expression tree rooted at this node.
String toString ()
 Returns a string that represents the expression tree rooted at this node.

Protected Member Functions

void checkBeforeAccept (Expression x)
 Protected method used to verify that the specified expression can be included as a child expression of this node.

Protected Attributes

Expression leftChild = null
Expression rightChild = null
Expression parent = null

Detailed Description

A node of an expression tree, represented by the symbol "^".

Definition at line 6 of file PowNode.java.


Constructor & Destructor Documentation

com.graphbuilder.math.PowNode.PowNode ( Expression  leftChild,
Expression  rightChild 
)

Definition at line 8 of file PowNode.java.


Member Function Documentation

void com.graphbuilder.math.Expression.checkBeforeAccept ( Expression  x  )  [protected, inherited]

Protected method used to verify that the specified expression can be included as a child expression of this node.

Exceptions:
IllegalArgumentException If the specified expression is not accepted.

Definition at line 51 of file Expression.java.

References com.graphbuilder.math.Expression.isDescendent(), and com.graphbuilder.math.Expression.parent.

Referenced by com.graphbuilder.math.FuncNode.insert(), com.graphbuilder.math.OpNode.setLeftChild(), and com.graphbuilder.math.OpNode.setRightChild().

double com.graphbuilder.math.PowNode.eval ( VarMap  v,
FuncMap  f 
) [virtual]

Raises the evaluation of the left side to the power of the evaluation of the right side and returns the result.

Implements com.graphbuilder.math.Expression.

Definition at line 15 of file PowNode.java.

References com.graphbuilder.math.Expression.eval(), com.graphbuilder.math.OpNode.leftChild, and com.graphbuilder.math.OpNode.rightChild.

String [] com.graphbuilder.math.Expression.getFunctionNames (  )  [inherited]

Returns an array of exact length of the function names contained in the expression tree rooted at this node.

Definition at line 72 of file Expression.java.

References com.graphbuilder.math.Expression.getTermNames().

Expression com.graphbuilder.math.OpNode.getLeftChild (  )  [inherited]

Definition at line 33 of file OpNode.java.

References com.graphbuilder.math.OpNode.leftChild.

Expression com.graphbuilder.math.Expression.getParent (  )  [inherited]

Returns the parent of this node.

Definition at line 41 of file Expression.java.

References com.graphbuilder.math.Expression.parent.

Expression com.graphbuilder.math.OpNode.getRightChild (  )  [inherited]

Definition at line 37 of file OpNode.java.

References com.graphbuilder.math.OpNode.rightChild.

String com.graphbuilder.math.PowNode.getSymbol (  )  [virtual]

Returns the text symbol that represents the operation.

Implements com.graphbuilder.math.OpNode.

Definition at line 21 of file PowNode.java.

String [] com.graphbuilder.math.Expression.getVariableNames (  )  [inherited]

Returns an array of exact length of the variable names contained in the expression tree rooted at this node.

Definition at line 65 of file Expression.java.

References com.graphbuilder.math.Expression.getTermNames().

boolean com.graphbuilder.math.Expression.isDescendent ( Expression  x  )  [inherited]

Returns true if this node is a descendent of the specified node, false otherwise.

By this methods definition, a node is a descendent of itself.

Definition at line 26 of file Expression.java.

References com.graphbuilder.math.Expression.parent.

Referenced by com.graphbuilder.math.Expression.checkBeforeAccept().

void com.graphbuilder.math.OpNode.setLeftChild ( Expression  x  )  [inherited]
void com.graphbuilder.math.OpNode.setRightChild ( Expression  x  )  [inherited]
String com.graphbuilder.math.Expression.toString (  )  [inherited]

Returns a string that represents the expression tree rooted at this node.

Definition at line 114 of file Expression.java.

Referenced by edu.rice.cs.hpc.viewer.metric.ExtDerivedMetricDlg.createDialogArea(), and com.graphbuilder.math.Expression.toString().


Member Data Documentation

Expression com.graphbuilder.math.OpNode.leftChild = null [protected, inherited]
Expression com.graphbuilder.math.Expression.parent = null [protected, inherited]
Expression com.graphbuilder.math.OpNode.rightChild = null [protected, inherited]

The documentation for this class was generated from the following file:

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1