org.lsmp.djep.xjep
Class Eval
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.lsmp.djep.xjep.Eval
- All Implemented Interfaces:
- CommandVisitorI, PostfixMathCommandI
public class Eval
- extends PostfixMathCommand
- implements CommandVisitorI
Symbolic eval(x^3,x,2) operator.
- Author:
- R Morris.
Created on 18-Jun-2003
|
Constructor Summary |
Eval()
Create a function that evaluates the lhs with values given on rhs. |
|
Method Summary |
Node |
process(Node node,
Node[] children,
XJep xjep)
Performs the specified action on an expression tree. |
void |
run(Stack s)
Should not be called by evaluator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Eval
public Eval()
- Create a function that evaluates the lhs with values given on rhs.
e.g. eval(f,x,1,y,2) sets variable x to 1, y to 2 and evaluates f.
process
public Node process(Node node,
Node[] children,
XJep xjep)
throws ParseException
- Description copied from interface:
CommandVisitorI
- Performs the specified action on an expression tree.
- Specified by:
process in interface CommandVisitorI
- Parameters:
node - top node of the treechildren - the children of the node after they have been preprocessed.xjep - a reference to the current XJep interface.
- Returns:
- top node of the results.
- Throws:
ParseException
run
public void run(Stack s)
throws ParseException
- Should not be called by evaluator
- Specified by:
run in interface PostfixMathCommandI- Overrides:
run in class PostfixMathCommand
- Throws:
ParseException - if run.
Copyright © 2014. All rights reserved.