|
||||||||||
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.RandomNumberGeneratorCallObserver
public class RandomNumberGeneratorCallObserver
Observes the calls to the random number generator and count the number of drawn random number of different distributions. These calls are crucial for the stochastic algorithms because besides algebraic calculations are these the most time consuming operations.
This observer does take repeats into account. If you repeat the simulation, you will get an average over the results each run.
Stochastics
Constructor Summary | |
---|---|
RandomNumberGeneratorCallObserver(Simulator sim)
Creates the observer for the given simulator. |
Method Summary | |
---|---|
void |
activateReaction(int mu,
double tau,
Simulator.FireType fireType,
int times)
Do nothing. |
void |
finished()
Calculates the average. |
String[] |
getStyles()
Gets the styles for the columns. |
void |
started()
Resets the count variables of the random number generator calls. |
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()
|
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 RandomNumberGeneratorCallObserver(Simulator sim)
sim
- simulatorMethod 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
Stochastics.resetCounts()
public void step()
step
in class Observer
public void theta(double theta)
theta
in class Observer
theta
- moment in timepublic String[] getStyles()
GnuPlotObserver
getStyles
in interface GnuPlotObserver
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 to
GnuPlot
objectpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |