|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.stat.descriptive.DescriptiveStatistics
org.apache.commons.math.stat.descriptive.DescriptiveStatisticsImpl
Default implementation of
DescriptiveStatistics
.
Field Summary | |
protected ResizableDoubleArray |
eDA
Stored data values |
protected int |
windowSize
hold the window size |
Fields inherited from class org.apache.commons.math.stat.descriptive.DescriptiveStatistics |
INFINITE_WINDOW |
Constructor Summary | |
DescriptiveStatisticsImpl()
Construct a DescriptiveStatisticsImpl with infinite window |
|
DescriptiveStatisticsImpl(int window)
Construct a DescriptiveStatisticsImpl with finite window |
Method Summary | |
void |
addValue(double v)
Adds the value to the set of numbers |
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 |
long |
getN()
Returns the number of available values |
double[] |
getValues()
Returns the current set of values in an array of double primitives. |
int |
getWindowSize()
Access the window size. |
void |
setWindowSize(int windowSize)
WindowSize controls the number of values which contribute to the values returned by Univariate. |
Methods inherited from class org.apache.commons.math.stat.descriptive.DescriptiveStatistics |
getGeometricMean, getKurtosis, getMax, getMean, getMin, getPercentile, getSkewness, getSortedValues, getStandardDeviation, getSum, getSumsq, getVariance, newInstance, newInstance, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int windowSize
protected ResizableDoubleArray eDA
Constructor Detail |
public DescriptiveStatisticsImpl()
public DescriptiveStatisticsImpl(int window)
window
- the finite window size.Method Detail |
public int getWindowSize()
getWindowSize
in class DescriptiveStatistics
public double[] getValues()
DescriptiveStatistics
getValues
in class DescriptiveStatistics
DescriptiveStatistics.getValues()
public double getElement(int index)
DescriptiveStatistics
getElement
in class DescriptiveStatistics
index
- The Index of the element
DescriptiveStatistics.getElement(int)
public long getN()
DescriptiveStatistics
getN
in interface StatisticalSummary
getN
in class DescriptiveStatistics
DescriptiveStatistics.getN()
public void addValue(double v)
DescriptiveStatistics
addValue
in class DescriptiveStatistics
v
- the value to be addedDescriptiveStatistics.addValue(double)
public void clear()
DescriptiveStatistics
clear
in class DescriptiveStatistics
DescriptiveStatistics.clear()
public void setWindowSize(int windowSize)
DescriptiveStatistics
setWindowSize
in class DescriptiveStatistics
windowSize
- sets the size of the window.DescriptiveStatistics.setWindowSize(int)
public double apply(UnivariateStatistic stat)
apply
in class DescriptiveStatistics
stat
- the statistic to apply
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |