|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--jmathlib.AbstractOdeSolver
A class to solve x'(t) = f(t,x) ODE's Concrete implementation of this class must override at least 'computeSolution' and 'function' methods. - 'computeSolution' is called by this Thread's run method - 'function' is normally called by the concrete implementation of 'computeSolution'
Field Summary | |
protected double |
currentTime
The current value of variable 't' |
protected boolean |
killed
if true, algorithm terminates immediately |
protected java.util.Vector |
listenerList
a list of listeners to be notified signals during algorithm run-time |
protected int |
npts
The number of values to be computed |
protected Curve |
results
A Vector that stores computation results, each element being an array of double of type {t,x_1(t),... |
protected int |
sleepTime
How long the thread sleeps between each step (allowing the user to adjust the simulation's speed) If 0 (the default), the thread just yields. |
protected double |
tend
The ODE's solution end time |
protected double |
tstart
The ODE's solution start time |
protected double[] |
x0
The initial condition X(0)[] |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
AbstractOdeSolver(double tstart,
double tend,
double[] x0,
int npts)
|
Method Summary | |
void |
addSignalListener(SignalListener listener)
registers a SignalListener to receive SignalEvent during algorithm run-time note : this method tries to mimic javax.swing.EventListener as much as possible, (seeing that swing classes ain't accessible easily from an applet). |
abstract void |
computeSolution()
ODE solver algorithm |
void |
fireSignal(SignalEvent event)
fires the given DrawingEvent to all registered DrawingListener's |
abstract double[] |
function(double t,
double[] x)
Right-hand side of ODE x' = f(x,t) |
double |
getCurrentTime()
|
abstract java.lang.String |
getDescription()
|
Curve |
getResults()
|
void |
kill()
|
void |
removeSignalListener(SignalListener listener)
|
void |
run()
Thread.run() method Mustn't be overriden by end-user... |
void |
setSleepingTime(int sleep)
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected double tstart
protected double tend
protected double[] x0
protected int npts
protected Curve results
protected double currentTime
protected int sleepTime
protected boolean killed
protected java.util.Vector listenerList
Constructor Detail |
public AbstractOdeSolver(double tstart, double tend, double[] x0, int npts)
tstart
- The ODE's solution start timetend
- The ODE's solution end timex0
- The initial condition X(0)[]npts
- The number of points to be computed ; defaults to 100 if npts = 0Method Detail |
public double getCurrentTime()
public Curve getResults()
public void setSleepingTime(int sleep)
sleepin'time
- between each step in mspublic void run()
run
in class java.lang.Thread
public void kill()
public void addSignalListener(SignalListener listener)
public void removeSignalListener(SignalListener listener)
public void fireSignal(SignalEvent event)
public abstract void computeSolution()
public abstract double[] function(double t, double[] x)
public abstract java.lang.String getDescription()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |