public class TruncatingMultipleSimpleStatsTimeVarying extends SimpleStatsTimeVarying implements IndexedSampleStatistics
Getting the mean, variance, or standard deviation will cause a new
observation to be added to account for the time since the last observation,
therefore the value returned by getCount may not correspond to
the number of times newObservation has been called.
SimplStatsTimeVarying will return
statistics for all observations of the property independent of index.| Modifier and Type | Field and Description |
|---|---|
protected java.util.SortedMap<java.lang.Integer,SimpleStatsTimeVarying> |
indexedStats
Holds the table of indexed statistics.
|
private double |
truncationPoint |
diff, eventList, lastTime, mean, startTime, variancecount, DEFAULT_NAME, DEFAULT_NUMBER_FORMAT, maxObs, minObs, name, numberFormatEOL| Constructor and Description |
|---|
TruncatingMultipleSimpleStatsTimeVarying(double truncationPoint)
Creates a new instance with the default name.
|
TruncatingMultipleSimpleStatsTimeVarying(java.lang.String name,
double truncationPoint)
Creates a new instance with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Empties HashMap completely.
|
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) |
double |
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(double truncationPoint) |
java.lang.String |
toString()
Produces a String containing the name, SamplingType, and DataLines for
all of the properties.
|
getEventList, getEventListID, getMean, getSamplingType, getStandardDeviation, getStartTime, getVariance, newObservation, setEventList, setEventListID, setSamplingTypeclone, getCount, getDataLine, getMaxObs, getMinObs, getName, newObservation, newObservation, newObservation, setName, setNumberFormatequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCount, getMaxObs, getMean, getMinObs, getName, getSamplingType, getStandardDeviation, getVariance, newObservation, newObservation, newObservation, newObservation, setName, setNumberFormat, setSamplingTypeprotected java.util.SortedMap<java.lang.Integer,SimpleStatsTimeVarying> indexedStats
private double truncationPoint
public TruncatingMultipleSimpleStatsTimeVarying(double truncationPoint)
setNametruncationPoint - given truncation pointpublic TruncatingMultipleSimpleStatsTimeVarying(java.lang.String name,
double truncationPoint)
name - The name of the array of properties for which statistics will
be collected.truncationPoint - given truncation pointpublic void newObservation(double x,
int index)
IndexedSampleStatisticsnewObservation in interface IndexedSampleStatisticsx - The current value of the property.index - The index of the property.public void newObservation(java.lang.Number num,
int index)
IndexedSampleStatisticsnewObservation in interface IndexedSampleStatisticsnum - The new observationindex - The index of the property.public double getMean(int index)
getMean in interface IndexedSampleStatisticsindex - The index of the property.public double getVariance(int index)
getVariance in interface IndexedSampleStatisticsindex - The index of the property.public double getStandardDeviation(int index)
getStandardDeviation in interface IndexedSampleStatisticsindex - The index of the property.public int getCount(int index)
getCount in interface IndexedSampleStatisticsindex - The index of the property.public double getMinObs(int index)
getMinObs in interface IndexedSampleStatisticsindex - The index of the property.public double getMaxObs(int index)
getMaxObs in interface IndexedSampleStatisticsindex - The index of the property.public double[] getAllMean()
IndexedSampleStatisticsgetAllMean in interface IndexedSampleStatisticspublic double[] getAllVariance()
IndexedSampleStatisticsgetAllVariance in interface IndexedSampleStatisticspublic double[] getAllStandardDeviation()
IndexedSampleStatisticsgetAllStandardDeviation in interface IndexedSampleStatisticspublic SampleStatistics[] getAllSampleStat()
IndexedSampleStatisticsgetAllSampleStat in interface IndexedSampleStatisticspublic double[] getAllMaxObs()
IndexedSampleStatisticsgetAllMaxObs in interface IndexedSampleStatisticspublic double[] getAllMinObs()
IndexedSampleStatisticsgetAllMinObs in interface IndexedSampleStatisticspublic int[] getAllCount()
IndexedSampleStatisticsgetAllCount in interface IndexedSampleStatisticspublic void propertyChange(java.beans.PropertyChangeEvent e)
Note: MultipleSimpleStatsTimeVarying cannot be reset by an
event like AbstractSimpleStats.
propertyChange in interface java.beans.PropertyChangeListenerpropertyChange in class AbstractSimpleStatse - Given PropertyChangeEventpublic void reset()
SampleStatisticsreset in interface SampleStatisticsreset in class SimpleStatsTimeVaryingpublic void clear()
public java.lang.String toString()
toString in class AbstractSimpleStatsAbstractSimpleStats.getDataLine()public double getTruncationPoint()
public void setTruncationPoint(double truncationPoint)