|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.stat.DescriptiveStatistics
org.apache.commons.math.stat.AbstractStorelessDescriptiveStatistics
org.apache.commons.math.stat.StorelessDescriptiveStatisticsImpl
Accumulates univariate statistics for values fed in through the addValue() method. Does not store raw data values. All data are represented internally as doubles. Integers, floats and longs can be added, but they will be converted to doubles by addValue().
Field Summary |
Fields inherited from class org.apache.commons.math.stat.AbstractStorelessDescriptiveStatistics |
geoMean, kurtosis, max, mean, min, moment, n, skewness, sum, sumLog, sumsq, variance, windowSize |
Fields inherited from class org.apache.commons.math.stat.DescriptiveStatistics |
INFINITE_WINDOW, LEPTOKURTIC, MESOKURTIC, PLATYKURTIC |
Constructor Summary | |
StorelessDescriptiveStatisticsImpl()
Creates new univariate with an infinite window |
|
StorelessDescriptiveStatisticsImpl(int window)
Creates a new univariate with a fixed window |
Method Summary | |
void |
addValue(double value)
If windowSize is set to Infinite, moments are calculated using the following recursive strategy . |
double |
apply(UnivariateStatistic stat)
Apply the given statistic to this univariate collection. |
void |
clear()
Resets all statistics and storage |
double |
getElement(int index)
Returns the element at the specified index |
double |
getPercentile(double p)
Returns an estimate for the pth percentile of the stored values. |
double[] |
getSortedValues()
Returns the current set of values in an array of double primitives, sorted in ascending order. |
double[] |
getValues()
Returns the current set of values in an array of double primitives. |
String |
toString()
Generates a text report displaying univariate statistics from values that have been added. |
Methods inherited from class org.apache.commons.math.stat.AbstractStorelessDescriptiveStatistics |
getGeometricMean, getKurtosis, getKurtosisClass, getMax, getMean, getMin, getN, getSkewness, getStandardDeviation, getSum, getSumsq, getVariance, getWindowSize, setWindowSize |
Methods inherited from class org.apache.commons.math.stat.DescriptiveStatistics |
newInstance, newInstance, newInstance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StorelessDescriptiveStatisticsImpl()
public StorelessDescriptiveStatisticsImpl(int window)
window
- Window SizeMethod Detail |
public void addValue(double value)
addValue
in class AbstractStorelessDescriptiveStatistics
org.apache.commons.math.stat.Univariate#addValue(double)
public String toString()
toString
in class AbstractStorelessDescriptiveStatistics
public void clear()
DescriptiveStatistics
clear
in class AbstractStorelessDescriptiveStatistics
org.apache.commons.math.stat.Univariate#clear()
public double apply(UnivariateStatistic stat)
apply
in class AbstractStorelessDescriptiveStatistics
stat
- the statistic to apply
public double[] getValues()
DescriptiveStatistics
getValues
in class DescriptiveStatistics
public double[] getSortedValues()
DescriptiveStatistics
getSortedValues
in class DescriptiveStatistics
public double getElement(int index)
DescriptiveStatistics
getElement
in class DescriptiveStatistics
index
- The Index of the element
public double getPercentile(double p)
DescriptiveStatistics
0 < p < 100
(otherwise an
IllegalArgumentException
is thrown)Double.NaN
otherwise)
getPercentile
in class DescriptiveStatistics
p
- the requested percentile (scaled from 0 - 100)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |