commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdigg...@apache.org
Subject cvs commit: jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat Univariate.java StoreUnivariate.java
Date Sat, 05 Jul 2003 19:25:38 GMT
mdiggory    2003/07/05 12:25:38

  Modified:    math/src/java/org/apache/commons/math/stat Univariate.java
                        StoreUnivariate.java
  Log:
  Correcting checkstyle and javadoc errors.
  
  Revision  Changes    Path
  1.5       +32 -32    jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/Univariate.java
  
  Index: Univariate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/Univariate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Univariate.java	21 Jun 2003 23:38:27 -0000	1.4
  +++ Univariate.java	5 Jul 2003 19:25:38 -0000	1.5
  @@ -51,7 +51,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  - package org.apache.commons.math.stat;
  +package org.apache.commons.math.stat;
   
   /**
    *
  @@ -82,14 +82,14 @@
        * 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 <a href=http://www.xycoon.com/arithmetic_mean.htm>
        * arithmetic mean </a> of the available values 
        * @return The mean or Double.NaN if no values have been added.
        */
  -    abstract double getMean();
  +    double getMean();
   
       /** 
        * Returns the <a href=http://www.xycoon.com/geometric_mean.htm>
  @@ -97,73 +97,73 @@
        * @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 &lt;=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 &lt;=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 @@
       /**
        * 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 @@
        * have been added <strong> in that order</strong> 
        * then the <i>available values</i> 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);
   }
  
  
  
  1.5       +21 -18    jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/StoreUnivariate.java
  
  Index: StoreUnivariate.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/math/src/java/org/apache/commons/math/stat/StoreUnivariate.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- StoreUnivariate.java	21 Jun 2003 01:55:17 -0000	1.4
  +++ StoreUnivariate.java	5 Jul 2003 19:25:38 -0000	1.5
  @@ -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 <a href="mailto:tobrien@apache.org">Tim O'Brien</a>
  + * @author <a href="mailto:mdiggory@apache.org">Mark R. Diggory</a>
    */
   public interface StoreUnivariate extends Univariate {
   
  @@ -84,14 +87,14 @@
        * 
        * @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 @@
        *         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 @@
        * @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 
        * <a href="http://www.utdallas.edu/~ammann/stat5311/node8.html">here</a>
        * <p/>
        * <strong>Preconditions</strong>:<ul>
  -     * <li><code>0 &lt; p &lt; 100</code> (otherwise an <code>IllegalArgumentException
  -     *     </code> is thrown)</li>
  +     * <li><code>0 &lt; p &lt; 100</code> (otherwise an 
  +     * <code>IllegalArgumentException</code> is thrown)</li>
        * <li>at least one value must be stored (returns <code>Double.NaN
        *     </code> otherwise)</li>
        * </ul>
  @@ -148,6 +151,6 @@
        * @return An estimate for the pth percentile of the stored data 
        * values
        */
  -    public abstract double getPercentile(double p);
  +    double getPercentile(double p);
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message