public class LeapObserver extends Observer implements GnuPlotObserver
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 and Description |
---|
LeapObserver(Simulator sim,
String... speciesNames)
Creates the observer with a given simulator and given species
|
Modifier and Type | Method and Description |
---|---|
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() |
getLabelFormat, getNumSimulations, getPrintWriter, getSimulator, getTheta, print, setLabelFormat, setPrintWriter, setTheta
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 step()
public void theta(double theta)
public GnuPlot toGnuplot() throws IOException
GnuPlotObserver
GnuPlot
object and passes the actual observer data to it.toGnuplot
in interface GnuPlotObserver
GnuPlot
objectIOException
- 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 toGnuPlot
objectIOException
- if gnuplot could not be accessedpublic int getNumLeaps()
public String[] getStyles()
GnuPlotObserver
getStyles
in interface GnuPlotObserver
Copyright © 2007–2021. All rights reserved.