|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.simulation.observer.Observer
fern.simulation.observer.LeapObserver
public class LeapObserver
Observes the amount of given molecule species at each step
. It particularly
makes sense for the approximative leaping algorithms whose step
s are
precisely the leaps and you want to know about amount differences after each leap.
This observer does not take repeats into account. If you repeat the simulation, you will just get the results of the recent run.
Constructor Summary | |
---|---|
LeapObserver(Simulator sim,
String... speciesNames)
Creates the observer with a given simulator and given species |
Method Summary | |
---|---|
void |
activateReaction(int mu,
double tau,
Simulator.FireType fireType,
int times)
Do nothing. |
void |
finished()
Do nothing. |
int |
getNumLeaps()
Gets the number of the performed leaps |
String[] |
getStyles()
Gets the styles for the columns. |
void |
started()
Clears the recorded data. |
void |
step()
Record the time and amounts of the species. |
void |
theta(double theta)
Do nothing. |
GnuPlot |
toGnuplot()
Creates a new GnuPlot object and passes the actual observer data to it. |
GnuPlot |
toGnuplot(GnuPlot gnuplot)
Passes the actual observer data to a GnuPlot object. |
String |
toString()
|
Methods inherited from class fern.simulation.observer.Observer |
---|
getLabelFormat, getNumSimulations, getPrintWriter, getSimulator, getTheta, print, setLabelFormat, setPrintWriter, setTheta |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LeapObserver(Simulator sim, String... speciesNames)
sim
- simulatorspeciesNames
- names of the speciesMethod Detail |
---|
public void activateReaction(int mu, double tau, Simulator.FireType fireType, int times)
activateReaction
in class Observer
mu
- the reaction which is supposed to firetau
- the time the reaction fires (at this time Simulator.getTime()
does not necessarily yield the firing time)fireType
- the type of the firingtimes
- TODOpublic void finished()
finished
in class Observer
public void started()
started
in class Observer
public void step()
step
in class Observer
public void theta(double theta)
theta
in class Observer
theta
- moment in timepublic GnuPlot toGnuplot() throws IOException
GnuPlotObserver
GnuPlot
object and passes the actual observer data to it.
toGnuplot
in interface GnuPlotObserver
GnuPlot
object
IOException
- if gnuplot could not be accessedpublic GnuPlot toGnuplot(GnuPlot gnuplot) throws IOException
GnuPlotObserver
GnuPlot
object.
toGnuplot
in interface GnuPlotObserver
gnuplot
- the GnuPlot
object to pass the data to
GnuPlot
object
IOException
- if gnuplot could not be accessedpublic int getNumLeaps()
public String[] getStyles()
GnuPlotObserver
getStyles
in interface GnuPlotObserver
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |