public class MultipleSimpleStatsTimeVarying 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.
|
diff, eventList, lastTime, mean, startTime, variance
count, DEFAULT_NAME, DEFAULT_NUMBER_FORMAT, maxObs, minObs, name, numberFormat
EOL
Constructor and Description |
---|
MultipleSimpleStatsTimeVarying()
Creates a new instance with the default name.
|
MultipleSimpleStatsTimeVarying(java.lang.String name)
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 |
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.
|
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, setSamplingType
clone, getCount, getDataLine, getMaxObs, getMinObs, getName, newObservation, newObservation, newObservation, setName, setNumberFormat
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCount, getMaxObs, getMean, getMinObs, getName, getSamplingType, getStandardDeviation, getVariance, newObservation, newObservation, newObservation, newObservation, setName, setNumberFormat, setSamplingType
protected java.util.SortedMap<java.lang.Integer,SimpleStatsTimeVarying> indexedStats
public MultipleSimpleStatsTimeVarying()
setName
public MultipleSimpleStatsTimeVarying(java.lang.String name)
name
- The name of the array of properties for which statistics will
be collected.public 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: MultipleSimpleStatsTimeVarying
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 SimpleStatsTimeVarying
public void clear()
public java.lang.String toString()
toString
in class AbstractSimpleStats
AbstractSimpleStats.getDataLine()