|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPariProcess
Maintains a Pari process and provides send(java.lang.String) and receive() methods for communicating with it. It's hard-coded for
Pari under Windows, in that it uses \r\n as the
signal that a computation is finished.
Important: call destroy() when you're done to close
Pari and release I/O resources.
| Constructor Summary | |
PariProcess()
Convenience method for Mark's laptop. |
|
| Method Summary | |
void |
destroy()
Call this when you're done to destroy the process and release I/O resources. |
static void |
main(String[] args)
Runs a simple test. |
String |
receive()
Returns the result of the previous send(java.lang.String). |
void |
send(String s)
Sends its argument to Pari, followed by a newline. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PariProcess()
throws PariNotFoundException
| Method Detail |
public void send(String s)
throws IOException
send("2+2"). You can end the line with
semicolon to mean you don't want output, as long as there are
no trailing comments or whitespace after the semicolon.
IOExceptionpublic String receive()
send(java.lang.String). Don't use it
if the previous send(java.lang.String) ended in a semicolon, so that you
don't expect any output from it.
public void destroy()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||