|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.lsmp.djepExamples.MatrixConsole
This class implements a simple command line utility for evaluating mathematical expressions. Usage: java org.lsmp.djep.matrixParser.MatrixParserConsole [expression] If an argument is passed, it is interpreted as an expression and evaluated. Otherwise, a prompt is printed, and the user can enter expressions to be evaluated. To exit from the command prompt a 'q' must be entered. typing
diff(x^2,x)will differentiate x^2 wrt 2. And
eval(x^2,x,3)will calculate x^2 at x=3. Expresions like
eval(diff(diff(x^2+y^3,x),y),x,3,y,4)are also allowed.
Constructor Summary | |
MatrixConsole()
Constructor |
Method Summary | |
static void |
main(java.lang.String[] args)
Creates a new Console object and calls run() |
void |
run(java.lang.String[] args)
The input loop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MatrixConsole()
Method Detail |
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public void run(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |