com.graphbuilder.math
Class AddNode

java.lang.Object
  extended bycom.graphbuilder.math.Expression
      extended bycom.graphbuilder.math.OpNode
          extended bycom.graphbuilder.math.AddNode

public class AddNode
extends OpNode

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


Field Summary
 
Fields inherited from class com.graphbuilder.math.OpNode
leftChild, rightChild
 
Fields inherited from class com.graphbuilder.math.Expression
parent
 
Constructor Summary
AddNode(Expression leftChild, Expression rightChild)
           
 
Method Summary
 double eval(VarMap v, FuncMap f)
          Adds the evaluation of the left side to the evaluation of the right side and returns the result.
 java.lang.String getSymbol()
          Returns the text symbol that represents the operation.
 
Methods inherited from class com.graphbuilder.math.OpNode
getLeftChild, getRightChild, setLeftChild, setRightChild
 
Methods inherited from class com.graphbuilder.math.Expression
checkBeforeAccept, getFunctionNames, getParent, getVariableNames, isDescendent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddNode

public AddNode(Expression leftChild,
               Expression rightChild)
Method Detail

eval

public double eval(VarMap v,
                   FuncMap f)
Adds the evaluation of the left side to the evaluation of the right side and returns the result.

Specified by:
eval in class Expression

getSymbol

public java.lang.String getSymbol()
Description copied from class: OpNode
Returns the text symbol that represents the operation.

Specified by:
getSymbol in class OpNode