org.lsmp.djep.xjep
Class Eval

java.lang.Object
  extended by org.nfunk.jep.function.PostfixMathCommand
      extended by 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

Field Summary
 
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand
curNumberOfParameters, numberOfParameters
 
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(java.util.Stack s)
          Should not be called by evaluator
 
Methods inherited from class org.nfunk.jep.function.PostfixMathCommand
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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 tree
children - 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(java.util.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.


http://www.singularsys.com/jep Copyright © 2007 Singular Systems