org.lsmp.djepExamples
Class MatrixConsole

java.lang.Object
  extended byorg.lsmp.djepExamples.MatrixConsole

public class MatrixConsole
extends java.lang.Object

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

MatrixConsole

public MatrixConsole()
Constructor

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Creates a new Console object and calls run()

Throws:
java.io.IOException

run

public void run(java.lang.String[] args)
         throws java.io.IOException
The input loop

Throws:
java.io.IOException


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