|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.stat.StatProbe umontreal.iro.lecuyer.stat.Tally umontreal.iro.lecuyer.stat.TallyHistogram
public class TallyHistogram
This class is an extension of Tally
which gives a more detailed view
of the observations statistics. The individual observations are assumed to
fall into different bins (boxes) of equal width on an interval.
The total number of observations falling into the bins are kept in an array
of counters. This is useful, for example, if one wish to build a histogram
from the observations. One must access the array of bin counters
to compute quantities not supported by the methods in Tally
.
Never add or remove observations directly on the array of
bin counters because this would put the Tally
counters in an
inconsistent state.
Constructor Summary | |
---|---|
TallyHistogram(double a,
double b,
int s)
Constructs a TallyHistogram statistical probe. |
|
TallyHistogram(String name,
double a,
double b,
int s)
Constructs a new TallyHistogram statistical probe with name name. |
Method Summary | |
---|---|
void |
add(double x)
Gives a new observation x to the statistical collectors. |
TallyHistogram |
clone()
Clones this object and the array which stores the counters. |
double |
getA()
Returns the left boundary a of interval [a, b]. |
double |
getB()
Returns the right boundary b of interval [a, b]. |
int[] |
getCounters()
Returns the bin counters. |
int |
getNumBins()
Returns the number of bins s dividing the interval [a, b]. |
void |
init(double a,
double b,
int s)
Initializes this object. |
String |
toString()
Returns the bin counters as a String. |
Methods inherited from class umontreal.iro.lecuyer.stat.Tally |
---|
average, confidenceIntervalNormal, confidenceIntervalStudent, confidenceIntervalVarianceChi2, formatCINormal, formatCINormal, formatCIStudent, formatCIStudent, formatCIVarianceChi2, getConfidenceLevel, init, numberObs, report, report, reportAndCIStudent, reportAndCIStudent, setConfidenceIntervalNone, setConfidenceIntervalNormal, setConfidenceIntervalStudent, setConfidenceLevel, setShowNumberObs, shortReport, shortReportHeader, standardDeviation, variance |
Methods inherited from class umontreal.iro.lecuyer.stat.StatProbe |
---|
addObservationListener, clearObservationListeners, getName, isBroadcasting, isCollecting, max, min, notifyListeners, removeObservationListener, report, report, setBroadcasting, setCollecting, setName, sum |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TallyHistogram(double a, double b, int s)
a
- left boundary of intervalb
- right boundary of intervals
- number of binspublic TallyHistogram(String name, double a, double b, int s)
name
- the name of the tally.a
- left boundary of intervalb
- right boundary of intervals
- number of binsMethod Detail |
---|
public void init(double a, double b, int s)
s
- number of binsa
- left boundary of intervalb
- right boundary of intervalpublic void add(double x)
add
in class Tally
x
- observation valuepublic int[] getCounters()
public int getNumBins()
public double getA()
public double getB()
public TallyHistogram clone()
clone
in class Tally
public String toString()
toString
in class Object
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |