public class TruncatingMultipleSimpleStatsTally extends SimpleStatsTally implements IndexedSampleStatistics
The getters inherited from SimpleStatsTally
will return
statistics for all of the properties, independent of index.
Modifier and Type | Field and Description |
---|---|
private java.util.TreeMap<java.lang.Integer,SimpleStatsTally> |
indexedStats
Holds the collection of statistics.
|
private int |
truncationPoint |
count, DEFAULT_NAME, DEFAULT_NUMBER_FORMAT, maxObs, minObs, name, numberFormat
EOL
Constructor and Description |
---|
TruncatingMultipleSimpleStatsTally(int truncationPoint)
Creates a new instance with the default name.
|
TruncatingMultipleSimpleStatsTally(java.lang.String name,
int truncationPoint)
Creates a new instance with the given name.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getAllCount()
Gets the current number of observations for all of the properties in the
indexed property associated with this statistic.
|
double[] |
getAllMaxObs()
Gets the maximum value of all of the properties in the indexed property
associated with this statistic.
|
double[] |
getAllMean()
Gets the current mean of all of the properties in the indexed property
associated with this statistic.
|
double[] |
getAllMinObs()
Gets the minimum value of all of the properties in the indexed property
associated with this statistic.
|
SampleStatistics[] |
getAllSampleStat()
Gets the underlying SampleStatistics for all of the properties in the
indexed property associated with this statistic.
|
double[] |
getAllStandardDeviation()
Gets the current standard deviation of all of the properties in the
indexed property associated with this statistic.
|
double[] |
getAllVariance()
Gets the current variance of all of the properties in the indexed
property associated with this statistic.
|
int |
getCount(int index) |
double |
getMaxObs(int index) |
double |
getMean(int index) |
double |
getMinObs(int index) |
double |
getStandardDeviation(int index) |
int |
getTruncationPoint() |
double |
getVariance(int index) |
void |
newObservation(double x,
int index)
Adds a new observation for the given member of the collection of
properties associated with this SampleStatistic.
|
void |
newObservation(java.lang.Number num,
int index)
Adds a new observation for the given member of the collection of
properties associated with this SampleStatistic.
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
If the PropertyChangeEvent contains the indexed property associated with
this statistic then record a new observation for the index and value
contained in the event.
|
void |
reset()
Should reset/initialize all relevant counters.
|
void |
setTruncationPoint(int truncationPoint) |
java.lang.String |
toString()
Produces a String containing the name, SamplingType, and DataLines for
all of the properties.
|
getMean, getSamplingType, getStandardDeviation, getVariance, newObservation
clone, getCount, getDataLine, getMaxObs, getMinObs, getName, newObservation, newObservation, newObservation, setName, setNumberFormat, setSamplingType
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCount, getMaxObs, getMean, getMinObs, getName, getSamplingType, getStandardDeviation, getVariance, newObservation, newObservation, newObservation, newObservation, setName, setNumberFormat, setSamplingType
private java.util.TreeMap<java.lang.Integer,SimpleStatsTally> indexedStats
private int truncationPoint
public TruncatingMultipleSimpleStatsTally(int truncationPoint)
setName
.truncationPoint
- truncation pointpublic TruncatingMultipleSimpleStatsTally(java.lang.String name, int truncationPoint)
name
- The name of the property to collect statistics on.truncationPoint
- truncation pointpublic void newObservation(double x, int index)
IndexedSampleStatistics
newObservation
in interface IndexedSampleStatistics
x
- The current value of the property.index
- The index of the property.public void newObservation(java.lang.Number num, int index)
IndexedSampleStatistics
newObservation
in interface IndexedSampleStatistics
num
- The new observationindex
- The index of the property.public double getMean(int index)
getMean
in interface IndexedSampleStatistics
index
- The index of the property.public double getVariance(int index)
getVariance
in interface IndexedSampleStatistics
index
- The index of the property.public double getStandardDeviation(int index)
getStandardDeviation
in interface IndexedSampleStatistics
index
- The index of the property.public int getCount(int index)
getCount
in interface IndexedSampleStatistics
index
- The index of the property.public double getMinObs(int index)
getMinObs
in interface IndexedSampleStatistics
index
- The index of the property.public double getMaxObs(int index)
getMaxObs
in interface IndexedSampleStatistics
index
- The index of the property.public double[] getAllMean()
IndexedSampleStatistics
getAllMean
in interface IndexedSampleStatistics
public double[] getAllVariance()
IndexedSampleStatistics
getAllVariance
in interface IndexedSampleStatistics
public double[] getAllStandardDeviation()
IndexedSampleStatistics
getAllStandardDeviation
in interface IndexedSampleStatistics
public SampleStatistics[] getAllSampleStat()
IndexedSampleStatistics
getAllSampleStat
in interface IndexedSampleStatistics
public double[] getAllMaxObs()
IndexedSampleStatistics
getAllMaxObs
in interface IndexedSampleStatistics
public double[] getAllMinObs()
IndexedSampleStatistics
getAllMinObs
in interface IndexedSampleStatistics
public int[] getAllCount()
IndexedSampleStatistics
getAllCount
in interface IndexedSampleStatistics
public void propertyChange(java.beans.PropertyChangeEvent e)
Note: MultipleSimpleStatsTally
cannot be reset by an event
like AbstractSimpleStats
.
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class AbstractSimpleStats
e
- Given PropertyChangeEventpublic void reset()
SampleStatistics
reset
in interface SampleStatistics
reset
in class SimpleStatsTally
public java.lang.String toString()
toString
in class AbstractSimpleStats
AbstractSimpleStats.getDataLine()
public int getTruncationPoint()
public void setTruncationPoint(int truncationPoint)