diff --git a/src/java/org/apache/commons/math/stat/StoreUnivariate.java b/src/java/org/apache/commons/math/stat/StoreUnivariate.java index 389cf0708..1ced9592b 100644 --- a/src/java/org/apache/commons/math/stat/StoreUnivariate.java +++ b/src/java/org/apache/commons/math/stat/StoreUnivariate.java @@ -54,12 +54,15 @@ package org.apache.commons.math.stat; /** - * StoreUnivariate implements the Univariate interface but maintains the set of values - * which contribute to the values being returned. This implementation of Univariate - * provides additional functionality such as skewness, kurtosis, and mode. This additional - * functionality comes with a price of increased storage costs. + * StoreUnivariate implements the Univariate interface + * but maintains the set of values which contribute to + * the values being returned. This implementation of + * Univariate provides additional percentile functionality + * such as. This additional functionality comes with + * a price of increased storage costs. * * @author Tim O'Brien + * @author Mark R. Diggory */ public interface StoreUnivariate extends Univariate { @@ -84,14 +87,14 @@ public interface StoreUnivariate extends Univariate { * * @return The skewness of this distribution */ - public abstract double getSkewness(); + double getSkewness(); /** * Kurtosis is a measure of the "peakedness" of a distribution * * @return the mode */ - public abstract double getKurtosis(); + double getKurtosis(); /** * Returns the Kurtosis "classification" a distribution can be @@ -102,7 +105,7 @@ public interface StoreUnivariate extends Univariate { * StoredDeviation.LEPTOKURITC, StoredDeviation.PLATYKURTIC, or * StoredDeviation.MESOKURTIC */ - public abstract int getKurtosisClass(); + int getKurtosisClass(); /** * Returns the current set of values in an array of double primitives. @@ -113,33 +116,33 @@ public interface StoreUnivariate extends Univariate { * @return returns the current set of numbers in the order in which they * were added to this set */ - public abstract double[] getValues(); - + double[] getValues(); + /** * Returns the current set of values in an array of double primitives, * sorted in ascending order. The returned array is a fresh * copy of the underlying data -- i.e., it is not a reference to the * stored data. - * - * @return returns the current set of numbers sorted in ascending order + * @return returns the current set of + * numbers sorted in ascending order */ - public abstract double[] getSortedValues(); + double[] getSortedValues(); /** * Returns the element at the specified index - * + * @param index The Index of the element * @return return the element at the specified index */ - public abstract double getElement(int index); - + double getElement(int index); + /** * Returns an estimate for the pth percentile of the stored values. * This estimate follows the interpolation-adjusted defintion presented * here *

* Preconditions:

@@ -148,6 +151,6 @@ public interface StoreUnivariate extends Univariate { * @return An estimate for the pth percentile of the stored data * values */ - public abstract double getPercentile(double p); + double getPercentile(double p); } diff --git a/src/java/org/apache/commons/math/stat/Univariate.java b/src/java/org/apache/commons/math/stat/Univariate.java index cb9f1023a..712f5d2ca 100644 --- a/src/java/org/apache/commons/math/stat/Univariate.java +++ b/src/java/org/apache/commons/math/stat/Univariate.java @@ -51,7 +51,7 @@ * information on the Apache Software Foundation, please see * . */ - package org.apache.commons.math.stat; +package org.apache.commons.math.stat; /** * @@ -73,7 +73,7 @@ * @author Phil Steitz * @author Tim O'Brien * @author Mark Diggory - * @version $Revision: 1.4 $ $Date: 2003/06/21 23:38:27 $ + * @version $Revision: 1.5 $ $Date: 2003/07/05 19:25:38 $ * */ public interface Univariate { @@ -82,14 +82,14 @@ public interface Univariate { * Adds the value to the set of numbers * @param v the value to be added */ - abstract void addValue(double v); + void addValue(double v); /** * Returns the * arithmetic mean of the available values * @return The mean or Double.NaN if no values have been added. */ - abstract double getMean(); + double getMean(); /** * Returns the @@ -97,73 +97,73 @@ public interface Univariate { * @return The geometricMean, Double.NaN if no values have been added, * or if the productof the available values is less than or equal to 0. */ - abstract double getGeometricMean(); + double getGeometricMean(); /** * Returns the variance of the available values. * @return The variance, Double.NaN if no values have been added * or 0.0 for a single value set. */ - abstract double getVariance(); + double getVariance(); /** * Returns the standard deviation of the available values. * @return The standard deviation, Double.NaN if no values have been added * or 0.0 for a single value set. */ - abstract double getStandardDeviation(); + double getStandardDeviation(); - /** + /** * Returns the skewness of the available values. Skewness is a * measure of the assymetry of a given distribution. - * @return The skewness, Double.NaN if no values have been added + * @return The skewness, Double.NaN if no values have been added * or 0.0 for a value set <=2. - */ - abstract double getSkewness(); - - /** + */ + double getSkewness(); + + /** * Returns the Kurtosis of the available values. Kurtosis is a * measure of the "peakedness" of a distribution * @return The kurtosis, Double.NaN if no values have been added, or 0.0 * for a value set <=3. - */ - abstract double getKurtosis(); - + */ + double getKurtosis(); + /** * Returns the maximum of the available values * @return The max or Double.NaN if no values have been added. */ - abstract double getMax(); + double getMax(); - /** - * Returns the minimum of the available values - * @return The min or Double.NaN if no values have been added. - */ - abstract double getMin(); + /** + * Returns the minimum of the available values + * @return The min or Double.NaN if no values have been added. + */ + double getMin(); /** * Returns the number of available values * @return The number of available values */ - abstract int getN(); + int getN(); /** * Returns the sum of the values that have been added to Univariate. * @return The sum or Double.NaN if no values have been added */ - abstract double getSum(); + double getSum(); /** * Returns the sum of the squares of the available values. * @return The sum of the squares or Double.NaN if no * values have been added. */ - abstract double getSumsq(); + double getSumsq(); /** * Resets all statistics and storage */ - abstract void clear(); + void clear(); /** * This constant signals that a Univariate implementation @@ -176,10 +176,10 @@ public interface Univariate { /** * Univariate has the ability to return only measures for the * last N elements added to the set of values. - * @return The current window size or -1 if its Infinite. - */ + * @return The current window size or -1 if its Infinite. + */ - abstract int getWindowSize(); + int getWindowSize(); /** * WindowSize controls the number of values which contribute @@ -188,7 +188,7 @@ public interface Univariate { * have been added in that order * then the available values are {3,4,5} and all * reported statistics will be based on these values - * @param windowSize sets the size of the window. - */ - abstract void setWindowSize(int windowSize); + * @param windowSize sets the size of the window. + */ + void setWindowSize(int windowSize); }