|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.graphbuilder.math.Expression
com.graphbuilder.math.TermNode
com.graphbuilder.math.FuncNode
A node of an expression tree that represents a function. A FuncNode can have 0 or more children.
Field Summary |
Fields inherited from class com.graphbuilder.math.TermNode |
name, negate |
Fields inherited from class com.graphbuilder.math.Expression |
parent |
Constructor Summary | |
FuncNode(java.lang.String name,
boolean negate)
|
Method Summary | |
void |
add(Expression x)
Adds the expression as a child. |
Expression |
child(int i)
Returns the child expression at the specified index. |
double |
eval(VarMap v,
FuncMap f)
Evaluates each of the children, storing the result in an internal double array. |
void |
insert(Expression x,
int i)
Adds the expression as a child at the specified index. |
int |
numChildren()
Returns the number of child expressions. |
void |
remove(Expression x)
Removes the specified expression as a child. |
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 |
public FuncNode(java.lang.String name, boolean negate)
Method Detail |
public void add(Expression x)
public void insert(Expression x, int i)
public void remove(Expression x)
public int numChildren()
public Expression child(int i)
public double eval(VarMap v, FuncMap f)
eval
in class Expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |