Class MatrixConsole
java.lang.Object
com.singularsys.jepexamples.consoles.Console
com.singularsys.extexamples.consoles.MatrixConsole
Console with support for matrix operations.
- Author:
- Rich Morris Created on 21-Mar-2005
-
Nested Class Summary
Nested classes/interfaces inherited from class com.singularsys.jepexamples.consoles.Console
Console.JepOutputStream, Console.JepPrintStream, Console.NodeRes, Console.SPEC_ACTION -
Field Summary
Fields inherited from class com.singularsys.jepexamples.consoles.Console
altered, doubleFormat, history, jep, showHistory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsets up all the needed objects.static voidCreates a new Console object and calls run()voidPrint help message.voidPrints introductory text.voidsetIndexShift(int i) Set the index shift for arrays.testSpecialCommands(String command) Checks for special commands.Return string representation of object.Methods inherited from class com.singularsys.jepexamples.consoles.Console
clearVars, finaliseCommand, getCommand, getHistory, getJep, getPrompt, handleError, inputLoop, parseEvaluate, print, printFunctionEntry, printFuns, printHistory, println, printOps, printStdHelp, printVars, processCommand, processEquation, run, setAlteredCommand, setEvaluator, setFormat, setFormat, setMonitor, showCalls, showTree, split
-
Constructor Details
-
MatrixConsole
public MatrixConsole()
-
-
Method Details
-
initialise
public void initialise()Description copied from class:Consolesets up all the needed objects.- Overrides:
initialisein classConsole
-
printIntroText
public void printIntroText()Description copied from class:ConsolePrints introductory text.- Overrides:
printIntroTextin classConsole
-
testSpecialCommands
Description copied from class:ConsoleChecks for special commands. For example a subclass may have a verbose mode switched on of off using the commandverbose on
This method can be used detected this input, perform required actions and skip normal processing by returning true.
In general subclasses should call the superclass methods to test for special commands that class implements
- Overrides:
testSpecialCommandsin classConsole- Parameters:
command-- Returns:
- One of
- SPEC_ACTION.CONTINUE - continue parsing and evaluation this equation,
- SPEC_ACTION.BREAK - stop processing this equation and add it to the history
- SPEC_ACTION.EMPTY - stop processing this equation does not add it to the history
- SPEC_ACTION.ALTERED - the input text has been altered, reprocess the new text
- SPEC_ACTION.EXIT stop the program
- See Also:
-
printHelp
public void printHelp()Description copied from class:ConsolePrint help message. -
main
Creates a new Console object and calls run() -
toString
Description copied from class:ConsoleReturn string representation of object. Used the doubleFormat if specified. -
setIndexShift
public void setIndexShift(int i) Description copied from class:ConsoleSet the index shift for arrays.- Overrides:
setIndexShiftin classConsole- Parameters:
i- the shift, either 0 or 1
-