|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.stat.StatProbe
public abstract class StatProbe
StatProbe
The objects of this class are statistical probes or collectors, which are elementary devices for collecting statistics. Each probe collects statistics on a given variable. The subclasses Tally, TallyStore, and umontreal.iro.lecuyer.simeventsAccumulate (from package umontreal.iro.lecuyersimevents) implement two kinds of probes, for the case of successive observations X1, X2, X3,..., and for the case of a variable whose value evolves in time, respectively.
Each instance of StatProbe contains a list of ObservationListener that can listen to individual observations. When a probe is updated, i.e., receives a new statistical observation, it broadcasts this new data to all registered observers. The broadcasting of observations to registered observers can be turned ON or OFF at any time. It is initially OFF by default and should stay OFF when there are no registered observers, to avoid unnecessary overhead.
The data collection by the statistical probe itself can also be turned ON or OFF. By default, it is initially ON. We can turn it OFF, for example, if we want to use the statistical probe only to pass data to the observers, and do not need it to store any information.
In the simplest programs, collection is ON, broadcast is OFF, and the overall stats are accessed via the methods min, max, sum, average, ... of the collector.
Constructor Summary | |
---|---|
StatProbe()
|
Method Summary | |
---|---|
void |
addObservationListener(ObservationListener l)
. |
abstract double |
average()
. |
void |
clearObservationListeners()
. |
StatProbe |
clone()
|
String |
getName()
. |
abstract void |
init()
. |
boolean |
isBroadcasting()
. |
boolean |
isCollecting()
. |
double |
max()
. |
double |
min()
. |
void |
notifyListeners(double x)
. |
void |
removeObservationListener(ObservationListener l)
. |
abstract String |
report()
. |
static String |
report(String globalName,
Iterable<? extends StatProbe> probes)
. |
static String |
report(String globalName,
StatProbe[] probes)
. |
void |
setBroadcasting(boolean b)
. |
void |
setCollecting(boolean b)
. |
void |
setName(String name)
. |
abstract String |
shortReport()
. |
abstract String |
shortReportHeader()
. |
double |
sum()
. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StatProbe()
Method Detail |
---|
public abstract void init()
public void setName(String name)
public String getName()
public double min()
public double max()
public double sum()
public abstract double average()
public abstract String report()
public abstract String shortReport()
public abstract String shortReportHeader()
public static String report(String globalName, StatProbe[] probes)
public static String report(String globalName, Iterable<? extends StatProbe> probes)
public boolean isBroadcasting()
public void setBroadcasting(boolean b)
public boolean isCollecting()
public void setCollecting(boolean b)
public void addObservationListener(ObservationListener l)
public void removeObservationListener(ObservationListener l)
public void clearObservationListeners()
public void notifyListeners(double x)
public StatProbe clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |