public class FireTypeObserver extends Observer implements GnuPlotObserver
If the simulation is repeated, the average numbers are calculated.
Simulator.FireType
Constructor and Description |
---|
FireTypeObserver(Simulator sim)
Create the observer for the given simulator.
|
Modifier and Type | Method and Description |
---|---|
void |
activateReaction(int mu,
double tau,
Simulator.FireType fireType,
int times)
Counts the firing for the given
Simulator.FireType |
void |
finished()
Calculates the average over all runs of the simulator.
|
String[] |
getStyles()
Gets the styles for the columns.
|
void |
started()
Do nothing.
|
void |
step()
Do nothing.
|
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 FireTypeObserver(Simulator sim)
sim
- simulatorpublic void activateReaction(int mu, double tau, Simulator.FireType fireType, int times)
Simulator.FireType
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()
public void theta(double theta)
public GnuPlot toGnuplot()
GnuPlotObserver
GnuPlot
object and passes the actual observer data to it.toGnuplot
in interface GnuPlotObserver
GnuPlot
objectpublic GnuPlot toGnuplot(GnuPlot gnuplot)
GnuPlotObserver
GnuPlot
object.toGnuplot
in interface GnuPlotObserver
gnuplot
- the GnuPlot
object to pass the data toGnuPlot
objectpublic String[] getStyles()
GnuPlotObserver
getStyles
in interface GnuPlotObserver
Copyright © 2007–2021. All rights reserved.