com.graphbuilder.math
Class VarNode

java.lang.Object
  extended bycom.graphbuilder.math.Expression
      extended bycom.graphbuilder.math.TermNode
          extended bycom.graphbuilder.math.VarNode

public class VarNode
extends TermNode

A node of an expression tree that represents a variable. A VarNode cannot have any children.


Field Summary
 
Fields inherited from class com.graphbuilder.math.TermNode
name, negate
 
Fields inherited from class com.graphbuilder.math.Expression
parent
 
Constructor Summary
VarNode(java.lang.String name, boolean negate)
           
 
Method Summary
 double eval(VarMap v, FuncMap f)
          Returns the value associated with the variable name in the VarMap.
 
Methods inherited from class com.graphbuilder.math.TermNode
getName, getNegate, setName, setNegate
 
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

VarNode

public VarNode(java.lang.String name,
               boolean negate)
Method Detail

eval

public double eval(VarMap v,
                   FuncMap f)
Returns the value associated with the variable name in the VarMap.

Specified by:
eval in class Expression