public class AmountAtMomentObserver extends Observer implements SimulationController, GnuPlotObserver
SimulationController and registers a theta at
the simulator. The data produced after are histograms for each species representing the
distribution of amounts at theta.Observer.getTheta()| Constructor and Description |
|---|
AmountAtMomentObserver(Simulator sim,
double moment,
int... speciesIndices)
Creates the observer for the given simulator, the given theta and the given species
|
AmountAtMomentObserver(Simulator sim,
double moment,
String... speciesName)
Creates the observer for the given simulator, the given theta and the 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.
|
Map<Integer,Integer> |
getHistogram(int species)
Gets the histogram of the distribution for a species
|
String[] |
getStyles()
Gets the styles for the columns.
|
boolean |
goOn(Simulator sim)
Causes the simulator to stop when
theta has been passed and the amounts have been
recorded. |
void |
started()
Register theta at the simulator.
|
void |
step()
Do nothing.
|
void |
theta(double theta)
Records the amounts of the species and puts it into the histogram.
|
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, setThetapublic AmountAtMomentObserver(Simulator sim, double moment, String... speciesName)
sim - simulatormoment - thetaspeciesName - names of the species to observepublic AmountAtMomentObserver(Simulator sim, double moment, int... speciesIndices)
sim - simulatormoment - thetaspeciesIndices - indices of the species to observepublic boolean goOn(Simulator sim)
theta has been passed and the amounts have been
recorded.goOn in interface SimulationControllersim - simulationpublic void activateReaction(int mu,
double tau,
Simulator.FireType fireType,
int times)
activateReaction in class Observermu - 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 theta(double theta)
public void started()
public GnuPlot toGnuplot() throws IOException
GnuPlotObserverGnuPlot object and passes the actual observer data to it.toGnuplot in interface GnuPlotObserverGnuPlot objectIOException - if gnuplot could not be accessedpublic GnuPlot toGnuplot(GnuPlot gnuplot) throws IOException
GnuPlotObserverGnuPlot object.toGnuplot in interface GnuPlotObservergnuplot - the GnuPlot object to pass the data toGnuPlot objectIOException - if gnuplot could not be accessedpublic Map<Integer,Integer> getHistogram(int species)
species - species index (but not in network index space - i means the ith passed species)public String[] getStyles()
GnuPlotObservergetStyles in interface GnuPlotObserverCopyright © 2007–2021. All rights reserved.