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/math/src/java/org/apache/commons/math/stat/univariate StorelessUnivariateStatistic.java
Date Wed, 19 Nov 2003 03:28:25 GMT
mdiggory    2003/11/18 19:28:25

  Modified:    math/src/java/org/apache/commons/math/analysis
                        SplineInterpolator.java BrentSolver.java
                        BisectionSolver.java PolynomialFunction.java
                        CubicSplineFunction.java SecantSolver.java
                        UnivariateRealSolverFactoryImpl.java
                        UnivariateRealSolverImpl.java
               math/src/java/org/apache/commons/math/stat
                        DescriptiveStatisticsImpl.java
                        DescriptiveStatistics.java Frequency.java
                        StorelessDescriptiveStatisticsImpl.java
               math/src/java/org/apache/commons/math/util
                        TransformerMap.java FixedDoubleArray.java
                        ContractableDoubleArray.java
                        ExpandableDoubleArray.java ContinuedFraction.java
                        DefaultTransformer.java
               math/src/java/org/apache/commons/math/stat/univariate/summary
                        SumOfSquares.java Product.java SumOfLogs.java
                        Sum.java
               math/src/java/org/apache/commons/math/random
                        ValueServer.java RandomDataImpl.java
                        EmpiricalDistributionImpl.java
               math/src/java/org/apache/commons/math/stat/univariate/rank
                        Min.java Max.java Percentile.java Median.java
               math/src/java/org/apache/commons/math/stat/univariate/moment
                        FirstMoment.java ThirdMoment.java Variance.java
                        Kurtosis.java Mean.java FourthMoment.java
                        SecondMoment.java GeometricMean.java
                        StandardDeviation.java Skewness.java
               math/src/java/org/apache/commons/math
                        MathConfigurationException.java
                        ConvergenceException.java MathException.java
               math/src/java/org/apache/commons/math/special Gamma.java
                        Beta.java
               math/src/java/org/apache/commons/math/complex Complex.java
               math/src/java/org/apache/commons/math/stat/univariate
                        StorelessUnivariateStatistic.java
  Log:
  Added Serialization Interface to all Implementations
  
  Revision  Changes    Path
  1.10      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/SplineInterpolator.java
  
  Index: SplineInterpolator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/SplineInterpolator.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- SplineInterpolator.java	14 Nov 2003 22:22:17 -0000	1.9
  +++ SplineInterpolator.java	19 Nov 2003 03:28:23 -0000	1.10
  @@ -53,13 +53,15 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   /**
    * Computes a natural spline interpolation for the data set.
    *
    * @version $Revision$ $Date$
    *
    */
  -public class SplineInterpolator implements UnivariateRealInterpolator {
  +public class SplineInterpolator implements UnivariateRealInterpolator, Serializable {
       /** the natural spline coefficients. */
       private double[][] c = null;
   
  
  
  
  1.9       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/BrentSolver.java
  
  Index: BrentSolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/BrentSolver.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BrentSolver.java	14 Nov 2003 22:22:17 -0000	1.8
  +++ BrentSolver.java	19 Nov 2003 03:28:23 -0000	1.9
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -63,7 +65,7 @@
    *  
    * @version $Revision$ $Date$
    */
  -public class BrentSolver extends UnivariateRealSolverImpl {
  +public class BrentSolver extends UnivariateRealSolverImpl implements Serializable {
       /**
        * Construct a solver for the given function.
        * @param f function to solve.
  
  
  
  1.8       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java
  
  Index: BisectionSolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/BisectionSolver.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BisectionSolver.java	14 Nov 2003 22:22:17 -0000	1.7
  +++ BisectionSolver.java	19 Nov 2003 03:28:23 -0000	1.8
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -61,7 +63,7 @@
    * function is supposed to be continuous but not necessarily smooth.
    * @version $Revision$ $Date$
    */
  -public class BisectionSolver extends UnivariateRealSolverImpl {
  +public class BisectionSolver extends UnivariateRealSolverImpl implements Serializable {
       /**
        * Construct a solver for the given function.
        * @param f function to solve.
  
  
  
  1.2       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/PolynomialFunction.java
  
  Index: PolynomialFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/PolynomialFunction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PolynomialFunction.java	15 Nov 2003 18:44:52 -0000	1.1
  +++ PolynomialFunction.java	19 Nov 2003 03:28:23 -0000	1.2
  @@ -55,6 +55,8 @@
   
   
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -66,7 +68,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class PolynomialFunction implements UnivariateRealFunction {
  +public class PolynomialFunction implements UnivariateRealFunction, Serializable {
   
       /**
        * The polynominal coefficients.
  
  
  
  1.9       +3 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java
  
  Index: CubicSplineFunction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/CubicSplineFunction.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CubicSplineFunction.java	15 Nov 2003 18:44:52 -0000	1.8
  +++ CubicSplineFunction.java	19 Nov 2003 03:28:23 -0000	1.9
  @@ -53,6 +53,7 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
   import java.util.Arrays;
   
   import org.apache.commons.math.MathException;
  @@ -66,7 +67,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class CubicSplineFunction implements UnivariateRealFunction {
  +public class CubicSplineFunction implements UnivariateRealFunction, Serializable {
       /** Spline segment interval delimiters. Size is N+1 for N segments. */
       private double xval[];
   
  
  
  
  1.9       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/SecantSolver.java
  
  Index: SecantSolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/SecantSolver.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SecantSolver.java	14 Nov 2003 22:22:17 -0000	1.8
  +++ SecantSolver.java	19 Nov 2003 03:28:23 -0000	1.9
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -65,7 +67,7 @@
    *  
    * @version $Revision$ $Date$
    */
  -public class SecantSolver extends UnivariateRealSolverImpl {
  +public class SecantSolver extends UnivariateRealSolverImpl implements Serializable {
       /**
        * Construct a solver for the given function.
        * @param f function to solve.
  
  
  
  1.7       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java
  
  Index: UnivariateRealSolverFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverFactoryImpl.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- UnivariateRealSolverFactoryImpl.java	14 Nov 2003 22:22:18 -0000	1.6
  +++ UnivariateRealSolverFactoryImpl.java	19 Nov 2003 03:28:23 -0000	1.7
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   
   /**
    * A factory to easily get a default solver and some convenience
  @@ -65,7 +67,7 @@
    * @version $Revision$ $Date$
    */
   public class UnivariateRealSolverFactoryImpl
  -    extends UnivariateRealSolverFactory {
  +    extends UnivariateRealSolverFactory implements Serializable {
           
       /**
        * Default constructor.
  
  
  
  1.8       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java
  
  Index: UnivariateRealSolverImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/analysis/UnivariateRealSolverImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- UnivariateRealSolverImpl.java	14 Nov 2003 22:22:17 -0000	1.7
  +++ UnivariateRealSolverImpl.java	19 Nov 2003 03:28:23 -0000	1.8
  @@ -54,6 +54,8 @@
   
   package org.apache.commons.math.analysis;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -63,7 +65,7 @@
    * @version $Revision$ $Date$
    */
   public abstract class UnivariateRealSolverImpl
  -    implements UnivariateRealSolver {
  +    implements UnivariateRealSolver, Serializable {
   
       /** Maximum absolute error. */
       protected double absoluteAccuracy;
  
  
  
  1.2       +3 -1      jakarta-commons/math/src/java/org/apache/commons/math/stat/DescriptiveStatisticsImpl.java
  
  Index: DescriptiveStatisticsImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/DescriptiveStatisticsImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptiveStatisticsImpl.java	15 Nov 2003 16:01:38 -0000	1.1
  +++ DescriptiveStatisticsImpl.java	19 Nov 2003 03:28:23 -0000	1.2
  @@ -53,13 +53,15 @@
    */
   package org.apache.commons.math.stat;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.*;
   import org.apache.commons.math.util.ContractableDoubleArray;
   
   /**
    * @version $Revision$ $Date$
    */
  -public class DescriptiveStatisticsImpl extends AbstractDescriptiveStatistics {
  +public class DescriptiveStatisticsImpl extends AbstractDescriptiveStatistics implements Serializable {
   
       /** A contractable double array is used.  memory is reclaimed when 
        * the storage of the array becomes too empty.
  
  
  
  1.2       +3 -1      jakarta-commons/math/src/java/org/apache/commons/math/stat/DescriptiveStatistics.java
  
  Index: DescriptiveStatistics.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/DescriptiveStatistics.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DescriptiveStatistics.java	15 Nov 2003 16:01:38 -0000	1.1
  +++ DescriptiveStatistics.java	19 Nov 2003 03:28:23 -0000	1.2
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.discovery.tools.DiscoverClass;
   
   /**
  @@ -64,7 +66,7 @@
    * a price of increased storage costs.
    * @version $Revision$ $Date$
    */
  -public abstract class DescriptiveStatistics {
  +public abstract class DescriptiveStatistics implements Serializable{
   
   	/**
   	 * Create an instance of a <code>DescriptiveStatistics</code>
  
  
  
  1.10      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/Frequency.java
  
  Index: Frequency.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/Frequency.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Frequency.java	14 Nov 2003 22:22:18 -0000	1.9
  +++ Frequency.java	19 Nov 2003 03:28:23 -0000	1.10
  @@ -53,6 +53,7 @@
    */
   package org.apache.commons.math.stat;
   
  +import java.io.Serializable;
   import java.util.Iterator;
   
   import org.apache.commons.collections.Bag;
  @@ -65,7 +66,8 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class Frequency {
  +public class Frequency implements Serializable{
  +    
       /** name for this frequency distribution. */
       private String name;
   
  
  
  
  1.2       +1 -3      jakarta-commons/math/src/java/org/apache/commons/math/stat/StorelessDescriptiveStatisticsImpl.java
  
  Index: StorelessDescriptiveStatisticsImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/StorelessDescriptiveStatisticsImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StorelessDescriptiveStatisticsImpl.java	15 Nov 2003 16:01:38 -0000	1.1
  +++ StorelessDescriptiveStatisticsImpl.java	19 Nov 2003 03:28:23 -0000	1.2
  @@ -68,9 +68,7 @@
    *
    * @version $Revision$ $Date$
   */
  -public class StorelessDescriptiveStatisticsImpl
  -	extends AbstractStorelessDescriptiveStatistics
  -	implements Serializable {
  +public class StorelessDescriptiveStatisticsImpl extends AbstractStorelessDescriptiveStatistics implements Serializable {
   
   	/** fixed storage */
   	private FixedDoubleArray storage = null;
  
  
  
  1.9       +3 -2      jakarta-commons/math/src/java/org/apache/commons/math/util/TransformerMap.java
  
  Index: TransformerMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/TransformerMap.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TransformerMap.java	15 Nov 2003 19:02:44 -0000	1.8
  +++ TransformerMap.java	19 Nov 2003 03:28:24 -0000	1.9
  @@ -53,6 +53,7 @@
    */
   package org.apache.commons.math.util;
   
  +import java.io.Serializable;
   import java.util.Collection;
   import java.util.HashMap;
   import java.util.Map;
  @@ -67,7 +68,7 @@
    * <code>double transform(Object o)</code> method.
    * @version $Revision$ $Date$
    */
  -public class TransformerMap implements NumberTransformer {
  +public class TransformerMap implements NumberTransformer, Serializable {
   
   	/**
   	 * A default Number Transformer for Numbers and numeric Strings.
  
  
  
  1.12      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/util/FixedDoubleArray.java
  
  Index: FixedDoubleArray.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/FixedDoubleArray.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- FixedDoubleArray.java	14 Nov 2003 22:22:17 -0000	1.11
  +++ FixedDoubleArray.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.util;
   
  +import java.io.Serializable;
  +
   /**
    * <p>
    * Provides an implementation of the DoubleArray with a maximum number of
  @@ -84,8 +86,10 @@
    * </p>
    * @version $Revision$ $Date$
    */
  -public class FixedDoubleArray implements DoubleArray {
  +public class FixedDoubleArray implements DoubleArray, Serializable {
   
  +    static final long serialVersionUID = 1247853239629842963L;    
  +    
       /**
        * This is the internal storage array.  This array is assigned
        * a known fixed size in the constructor
  
  
  
  1.10      +4 -4      jakarta-commons/math/src/java/org/apache/commons/math/util/ContractableDoubleArray.java
  
  Index: ContractableDoubleArray.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/ContractableDoubleArray.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ContractableDoubleArray.java	14 Nov 2003 22:22:17 -0000	1.9
  +++ ContractableDoubleArray.java	19 Nov 2003 03:28:24 -0000	1.10
  @@ -90,10 +90,10 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class ContractableDoubleArray
  -    extends ExpandableDoubleArray
  -    implements Serializable {
  +public class ContractableDoubleArray extends ExpandableDoubleArray implements Serializable {
   
  +    static final long serialVersionUID = -3485529955529426875L; 
  +   
       /** The contraction criteria defines the conditions under which this
        * object will "resize" the internal array to the number of elements
        * contained in the element array + 1
  
  
  
  1.11      +3 -1      jakarta-commons/math/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java
  
  Index: ExpandableDoubleArray.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/ExpandableDoubleArray.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ExpandableDoubleArray.java	14 Nov 2003 22:22:17 -0000	1.10
  +++ ExpandableDoubleArray.java	19 Nov 2003 03:28:24 -0000	1.11
  @@ -92,6 +92,8 @@
    */
   public class ExpandableDoubleArray implements Serializable, DoubleArray {
   
  +    static final long serialVersionUID = -5697417774251632284L;    
  +   
       // TODO: expansionFactor is valuable, by if I only need storage
       // for 1025 items and I use the default settings, I'll end up
       // with enough storage for 2048 elements.  Maybe this implementation
  
  
  
  1.9       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/util/ContinuedFraction.java
  
  Index: ContinuedFraction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/ContinuedFraction.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ContinuedFraction.java	14 Nov 2003 22:22:17 -0000	1.8
  +++ ContinuedFraction.java	19 Nov 2003 03:28:24 -0000	1.9
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.util;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.ConvergenceException;
   import org.apache.commons.math.MathException;
   
  @@ -67,7 +69,7 @@
    * </ul>
    * @version $Revision$ $Date$
    */
  -public abstract class ContinuedFraction {
  +public abstract class ContinuedFraction implements Serializable {
       /** Maximum allowed numerical error. */
       private static final double DEFAULT_EPSILON = 10e-9;
   
  
  
  
  1.10      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/util/DefaultTransformer.java
  
  Index: DefaultTransformer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/DefaultTransformer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DefaultTransformer.java	15 Nov 2003 19:02:44 -0000	1.9
  +++ DefaultTransformer.java	19 Nov 2003 03:28:24 -0000	1.10
  @@ -54,6 +54,8 @@
   
   package org.apache.commons.math.util;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   
   /**
  @@ -64,7 +66,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class DefaultTransformer implements NumberTransformer {
  +public class DefaultTransformer implements NumberTransformer, Serializable {
       
       /**
        * @param Object o Is the object that gets transformed.
  
  
  
  1.12      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java
  
  Index: SumOfSquares.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/SumOfSquares.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SumOfSquares.java	14 Nov 2003 22:22:23 -0000	1.11
  +++ SumOfSquares.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.summary;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,13 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class SumOfSquares extends AbstractStorelessUnivariateStatistic {
  +public class SumOfSquares extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = 1460986908574398008L;  
  +      
  +    /** */
  +    private int n = 0;
  +    
       /**
        * The currently running sumSq
        */
  @@ -80,6 +87,7 @@
           } else {
               value += d * d;
           }
  +        n++;
       }
   
       /**
  @@ -90,10 +98,18 @@
       }
   
       /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
  +    /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
       public void clear() {
           value = Double.NaN;
  +        n = 0;
       }
   
       /**
  
  
  
  1.12      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/Product.java
  
  Index: Product.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/Product.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Product.java	14 Nov 2003 22:22:23 -0000	1.11
  +++ Product.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.summary;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,13 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class Product extends AbstractStorelessUnivariateStatistic {
  +public class Product extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = 2824226005990582538L;   
  +     
  +    /** */
  +    private int n = 0;
  +    
       /**
        * The current Running Product.
        */
  @@ -80,6 +87,7 @@
           } else {
               value *= d;
           }
  +        n++;
       }
   
       /**
  @@ -90,10 +98,18 @@
       }
   
       /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
  +    /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
       public void clear() {
           value = Double.NaN;
  +        n = 0;
       }
   
       /**
  
  
  
  1.12      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java
  
  Index: SumOfLogs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/SumOfLogs.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SumOfLogs.java	14 Nov 2003 22:22:23 -0000	1.11
  +++ SumOfLogs.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.summary;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,13 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class SumOfLogs extends AbstractStorelessUnivariateStatistic {
  +public class SumOfLogs extends AbstractStorelessUnivariateStatistic implements Serializable {
  +
  +    static final long serialVersionUID = -370076995648386763L;    
   
  +    /** */
  +    private int n = 0;
  +    
       /**
        * The currently running value
        */
  @@ -84,6 +91,7 @@
           } else {
               value += Math.log(d);
           }
  +        n++;
       }
   
       /**
  @@ -94,11 +102,19 @@
       }
   
       /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
  +    /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
       public void clear() {
           value = Double.NaN;
           init = true;
  +        n = 0;
       }
   
       /**
  
  
  
  1.14      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java
  
  Index: Sum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/summary/Sum.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Sum.java	14 Nov 2003 22:22:23 -0000	1.13
  +++ Sum.java	19 Nov 2003 03:28:24 -0000	1.14
  @@ -53,13 +53,20 @@
    */
   package org.apache.commons.math.stat.univariate.summary;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic;
   
   /**
    * @version $Revision$ $Date$
    */
  -public class Sum extends AbstractStorelessUnivariateStatistic {
  +public class Sum extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = -8231831954703408316L;  
  +      
  +    /** */
  +    private int n = 0;
  +    
       /**
        * The currently running sum.
        */
  @@ -74,6 +81,7 @@
           } else {
               value += d;
           }
  +        n++;
       }
   
       /**
  @@ -84,10 +92,18 @@
       }
   
       /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
  +    /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
       public void clear() {
           value = Double.NaN;
  +        n = 0;
       }
   
       /**
  
  
  
  1.8       +3 -2      jakarta-commons/math/src/java/org/apache/commons/math/random/ValueServer.java
  
  Index: ValueServer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/random/ValueServer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ValueServer.java	14 Nov 2003 22:22:21 -0000	1.7
  +++ ValueServer.java	19 Nov 2003 03:28:24 -0000	1.8
  @@ -56,6 +56,7 @@
   import java.io.BufferedReader;
   import java.io.FileReader;
   import java.io.File;
  +import java.io.Serializable;
   import java.net.URL;
   import java.io.IOException;
   import java.net.MalformedURLException;
  @@ -81,7 +82,7 @@
    * @version $Revision$ $Date$
    *
    */
  -public class ValueServer {
  +public class ValueServer implements Serializable {
       /** mode determines how values are generated */
       private int mode = 5;
       
  
  
  
  1.9       +3 -2      jakarta-commons/math/src/java/org/apache/commons/math/random/RandomDataImpl.java
  
  Index: RandomDataImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/random/RandomDataImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RandomDataImpl.java	14 Nov 2003 22:22:21 -0000	1.8
  +++ RandomDataImpl.java	19 Nov 2003 03:28:24 -0000	1.9
  @@ -54,6 +54,7 @@
   
   package org.apache.commons.math.random;
   
  +import java.io.Serializable;
   import java.security.MessageDigest;
   import java.security.SecureRandom;
   import java.security.NoSuchAlgorithmException;
  @@ -106,7 +107,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class RandomDataImpl implements RandomData {
  +public class RandomDataImpl implements RandomData, Serializable {
       
       /** underlying random number generator */
       private Random rand = null;
  
  
  
  1.11      +2 -2      jakarta-commons/math/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java
  
  Index: EmpiricalDistributionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/random/EmpiricalDistributionImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- EmpiricalDistributionImpl.java	15 Nov 2003 16:01:37 -0000	1.10
  +++ EmpiricalDistributionImpl.java	19 Nov 2003 03:28:24 -0000	1.11
  @@ -91,7 +91,7 @@
    *
    * @version $Revision$ $Date$
    */
  -public class EmpiricalDistributionImpl implements Serializable,EmpiricalDistribution {
  +public class EmpiricalDistributionImpl implements Serializable, EmpiricalDistribution {
   
       
       /** List of DescriptiveStatistics objects characterizing the bins */
  
  
  
  1.12      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Min.java
  
  Index: Min.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Min.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Min.java	14 Nov 2003 22:22:21 -0000	1.11
  +++ Min.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.rank;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,13 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class Min extends AbstractStorelessUnivariateStatistic {
  +public class Min extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = -2941995784909003131L;  
  +      
  +    /** */
  +    private int n = 0;
  +    
       /** */
       private double value = Double.NaN;
   
  @@ -74,6 +81,7 @@
        */
       public void increment(final double d) {
           value = Double.isNaN(value) ? d : Math.min(value, d);
  +        n++;
       }
   
       /**
  @@ -81,6 +89,7 @@
        */
       public void clear() {
           value = Double.NaN;
  +        n = 0;
       }
   
       /**
  @@ -90,6 +99,13 @@
           return value;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
       /**
        * @see org.apache.commons.math.stat.univariate.UnivariateStatistic#evaluate(double[], int, int)
        */
  
  
  
  1.12      +18 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Max.java
  
  Index: Max.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Max.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Max.java	14 Nov 2003 22:22:21 -0000	1.11
  +++ Max.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.rank;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,13 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class Max extends AbstractStorelessUnivariateStatistic {
  +public class Max extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = -5593383832225844641L;    
  +    
  +    /** */
  +    private int n = 0;
  +        
       /** */
       private double value = Double.NaN;
   
  @@ -74,6 +81,7 @@
        */
       public void increment(final double d) {
           value = Double.isNaN(value) ? d : Math.max(value, d);
  +        n++;
       }
   
       /**
  @@ -81,6 +89,7 @@
            */
       public void clear() {
           value = Double.NaN;
  +        n = 0;
       }
   
       /**
  @@ -90,6 +99,13 @@
           return value;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
  +    }
  +    
       /**
        * @see org.apache.commons.math.stat.univariate.UnivariateStatistic#evaluate(double[], int, int)
        */
  
  
  
  1.11      +5 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java
  
  Index: Percentile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Percentile.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Percentile.java	14 Nov 2003 22:22:21 -0000	1.10
  +++ Percentile.java	19 Nov 2003 03:28:24 -0000	1.11
  @@ -53,14 +53,17 @@
    */
   package org.apache.commons.math.stat.univariate.rank;
   
  +import java.io.Serializable;
   import java.util.Arrays;
   import org.apache.commons.math.stat.univariate.AbstractUnivariateStatistic;
   
   /**
    * @version $Revision$ $Date$
    */
  -public class Percentile extends AbstractUnivariateStatistic {
  +public class Percentile extends AbstractUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = -8091216485095130416L; 
  +       
       /** */
       private double percentile = 0.0;
   
  
  
  
  1.9       +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Median.java
  
  Index: Median.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/rank/Median.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Median.java	14 Nov 2003 22:22:21 -0000	1.8
  +++ Median.java	19 Nov 2003 03:28:24 -0000	1.9
  @@ -53,11 +53,15 @@
    */
   package org.apache.commons.math.stat.univariate.rank;
   
  +import java.io.Serializable;
  +
   
   /**
    * @version $Revision$ $Date$
    */
  -public class Median extends Percentile {
  +public class Median extends Percentile implements Serializable {
  +
  +    static final long serialVersionUID = -3961477041290915687L;    
   
       /**
        *
  
  
  
  1.11      +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java
  
  Index: FirstMoment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/FirstMoment.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FirstMoment.java	14 Nov 2003 22:22:20 -0000	1.10
  +++ FirstMoment.java	19 Nov 2003 03:28:24 -0000	1.11
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic;
   
   /**
  @@ -64,8 +66,10 @@
    * </a>. Both incremental and evaluation strategies currently use this approach.
    * @version $Revision$ $Date$
    */
  -public class FirstMoment extends AbstractStorelessUnivariateStatistic {
  +public class FirstMoment extends AbstractStorelessUnivariateStatistic implements Serializable{
   
  +    static final long serialVersionUID = -803343206421984070L;    
  +    
       /** count of values that have been added */
       protected int n = 0;
   
  @@ -122,6 +126,13 @@
        */
       public double getResult() {
           return m1;
  +    }
  +
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return n;
       }
   
   }
  
  
  
  1.12      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java
  
  Index: ThirdMoment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/ThirdMoment.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ThirdMoment.java	14 Nov 2003 22:22:20 -0000	1.11
  +++ ThirdMoment.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   /**
    * The ThirdMoment (arithmentic mean) is calculated using the following
    * <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
  @@ -60,8 +62,10 @@
    * </a>. Both incremental and evaluation strategies currently use this approach.
    * @version $Revision$ $Date$
    */
  -public class ThirdMoment extends SecondMoment {
  +public class ThirdMoment extends SecondMoment implements Serializable {
   
  +    static final long serialVersionUID = -7818711964045118679L;  
  +      
       /** third moment of values that have been added */
       protected double m3 = Double.NaN;
   
  
  
  
  1.14      +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java
  
  Index: Variance.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Variance.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Variance.java	14 Nov 2003 22:22:20 -0000	1.13
  +++ Variance.java	19 Nov 2003 03:28:24 -0000	1.14
  @@ -53,14 +53,18 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic;
   
   /**
    *
    * @version $Revision$ $Date$
    */
  -public class Variance extends AbstractStorelessUnivariateStatistic {
  +public class Variance extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = -9111962718267217978L;  
  +      
       /** SecondMoment is used in incremental calculation of Variance*/
       protected SecondMoment moment = null;
   
  @@ -128,6 +132,13 @@
           return variance;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return moment.getN();
  +    }
  +    
       /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
  
  
  
  1.14      +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java
  
  Index: Kurtosis.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Kurtosis.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Kurtosis.java	14 Nov 2003 22:22:20 -0000	1.13
  +++ Kurtosis.java	19 Nov 2003 03:28:24 -0000	1.14
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -64,8 +66,10 @@
   /**
    * @version $Revision$ $Date$
    */
  -public class Kurtosis extends AbstractStorelessUnivariateStatistic {
  +public class Kurtosis extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = 2784465764798260919L;  
  +      
       /** */
       protected FourthMoment moment = null;
   
  @@ -140,6 +144,13 @@
           n = 0;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return moment.getN();
  +    }
  +    
       /*UnvariateStatistic Approach */
   
       /** */
  
  
  
  1.13      +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java
  
  Index: Mean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Mean.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Mean.java	14 Nov 2003 22:22:20 -0000	1.12
  +++ Mean.java	19 Nov 2003 03:28:24 -0000	1.13
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org
       .apache
       .commons
  @@ -67,8 +69,10 @@
    * arithmetic mean </a> of the available values.
    * @version $Revision$ $Date$
    */
  -public class Mean extends AbstractStorelessUnivariateStatistic {
  +public class Mean extends AbstractStorelessUnivariateStatistic implements Serializable{
   
  +    static final long serialVersionUID = -1296043746617791564L;    
  +    
       /** first moment of values that have been added */
       protected FirstMoment moment = null;
   
  @@ -114,6 +118,13 @@
           return moment.m1;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return moment.getN();
  +    }
  +    
       /*UnvariateStatistic Approach */
   
       /** */
  
  
  
  1.13      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java
  
  Index: FourthMoment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/FourthMoment.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- FourthMoment.java	14 Nov 2003 22:22:20 -0000	1.12
  +++ FourthMoment.java	19 Nov 2003 03:28:24 -0000	1.13
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   /**
    * The FourthMoment is calculated using the following
    * <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
  @@ -60,8 +62,10 @@
    * </a>. Both incremental and evaluation strategies currently use this approach.
    * @version $Revision$ $Date$
    */
  -public class FourthMoment extends ThirdMoment {
  +public class FourthMoment extends ThirdMoment implements Serializable{
   
  +    static final long serialVersionUID = 4763990447117157611L;
  +        
       /** fourth moment of values that have been added */
       protected double m4 = Double.NaN;
   
  
  
  
  1.12      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java
  
  Index: SecondMoment.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/SecondMoment.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SecondMoment.java	14 Nov 2003 22:22:20 -0000	1.11
  +++ SecondMoment.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   /**
    * The SecondMoment is calculated using the following
    * <a href="http://www.spss.com/tech/stat/Algorithms/11.5/descriptives.pdf">
  @@ -60,8 +62,10 @@
    * </a>. Both incremental and evaluation strategies currently use this approach.
    * @version $Revision$ $Date$
    */
  -public class SecondMoment extends FirstMoment {
  +public class SecondMoment extends FirstMoment implements Serializable {
   
  +    static final long serialVersionUID = 3942403127395076445L;  
  +      
       /** second moment of values that have been added */
       protected double m2 = Double.NaN;
   
  
  
  
  1.14      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java
  
  Index: GeometricMean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/GeometricMean.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GeometricMean.java	14 Nov 2003 22:22:20 -0000	1.13
  +++ GeometricMean.java	19 Nov 2003 03:28:24 -0000	1.14
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.summary.SumOfLogs;
   
   /**
  @@ -60,8 +62,10 @@
    * geometric mean </a> of the available values
    * @version $Revision$ $Date$
    */
  -public class GeometricMean extends SumOfLogs {
  +public class GeometricMean extends SumOfLogs implements Serializable{
   
  +    static final long serialVersionUID = -8178734905303459453L;  
  +      
       /** */
       protected int n = 0;
   
  
  
  
  1.12      +6 -2      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java
  
  Index: StandardDeviation.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/StandardDeviation.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StandardDeviation.java	14 Nov 2003 22:22:20 -0000	1.11
  +++ StandardDeviation.java	19 Nov 2003 03:28:24 -0000	1.12
  @@ -53,12 +53,16 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   /**
    *
    * @version $Revision$ $Date$
    */
  -public class StandardDeviation extends Variance {
  +public class StandardDeviation extends Variance implements Serializable {
   
  +    static final long serialVersionUID = 5728716329662425188L;    
  +    
       /** */
       protected double std = Double.NaN;
   
  
  
  
  1.14      +13 -2     jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java
  
  Index: Skewness.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/moment/Skewness.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Skewness.java	14 Nov 2003 22:22:20 -0000	1.13
  +++ Skewness.java	19 Nov 2003 03:28:24 -0000	1.14
  @@ -53,13 +53,17 @@
    */
   package org.apache.commons.math.stat.univariate.moment;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.stat.univariate.AbstractStorelessUnivariateStatistic;
   
   /**
    * @version $Revision$ $Date$
    */
  -public class Skewness extends AbstractStorelessUnivariateStatistic {
  +public class Skewness extends AbstractStorelessUnivariateStatistic implements Serializable {
   
  +    static final long serialVersionUID = 7101857578996691352L;    
  +    
       /** */
       protected ThirdMoment moment = null;
   
  @@ -120,6 +124,13 @@
           return skewness;
       }
   
  +    /**
  +     * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#getN()
  +     */
  +    public double getN() {
  +        return moment.getN();
  +    }
  +    
       /**
        * @see org.apache.commons.math.stat.univariate.StorelessUnivariateStatistic#clear()
        */
  
  
  
  1.12      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/MathConfigurationException.java
  
  Index: MathConfigurationException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/MathConfigurationException.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MathConfigurationException.java	14 Nov 2003 22:22:22 -0000	1.11
  +++ MathConfigurationException.java	19 Nov 2003 03:28:25 -0000	1.12
  @@ -53,11 +53,13 @@
    */
   package org.apache.commons.math;
   
  +import java.io.Serializable;
  +
   /**
    * Signals a configuration problem with any of the factory methods.
    * @version $Revision$ $Date$
    */
  -public class MathConfigurationException extends MathException {
  +public class MathConfigurationException extends MathException implements Serializable {
   
       /**
        * Default constructor.
  
  
  
  1.7       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/ConvergenceException.java
  
  Index: ConvergenceException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/ConvergenceException.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ConvergenceException.java	14 Nov 2003 22:22:22 -0000	1.6
  +++ ConvergenceException.java	19 Nov 2003 03:28:25 -0000	1.7
  @@ -53,13 +53,15 @@
    */
   package org.apache.commons.math;
   
  +import java.io.Serializable;
  +
   /**
    * Error thrown when a numerical computation can not be performed because the
    * numerical result failed to converge to a finite value.
    * 
    * @version $Revision$ $Date$
    */
  -public class ConvergenceException extends MathException {
  +public class ConvergenceException extends MathException implements Serializable{
       /**
        * Default constructor.
        */
  
  
  
  1.11      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/MathException.java
  
  Index: MathException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/MathException.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MathException.java	14 Nov 2003 22:22:22 -0000	1.10
  +++ MathException.java	19 Nov 2003 03:28:25 -0000	1.11
  @@ -53,13 +53,15 @@
    */
   package org.apache.commons.math;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.lang.exception.NestableException;
   
   /**
    * A generic exception indicating problems in the math package.
    * @version $Revision$ $Date$
    */
  -public class MathException extends NestableException {
  +public class MathException extends NestableException implements Serializable {
   
       /**
        * Constructs a MathException
  
  
  
  1.15      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/special/Gamma.java
  
  Index: Gamma.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/special/Gamma.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Gamma.java	14 Nov 2003 22:22:17 -0000	1.14
  +++ Gamma.java	19 Nov 2003 03:28:25 -0000	1.15
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.special;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.ConvergenceException;
   import org.apache.commons.math.MathException;
   
  @@ -62,7 +64,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class Gamma {
  +public class Gamma implements Serializable{
       /** Maximum allowed numerical error. */
       private static final double DEFAULT_EPSILON = 10e-9;
   
  
  
  
  1.14      +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/special/Beta.java
  
  Index: Beta.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/special/Beta.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Beta.java	18 Nov 2003 15:07:12 -0000	1.13
  +++ Beta.java	19 Nov 2003 03:28:25 -0000	1.14
  @@ -53,6 +53,8 @@
    */
   package org.apache.commons.math.special;
   
  +import java.io.Serializable;
  +
   import org.apache.commons.math.MathException;
   import org.apache.commons.math.util.ContinuedFraction;
   
  @@ -62,7 +64,7 @@
    * 
    * @version $Revision$ $Date$
    */
  -public class Beta {
  +public class Beta implements Serializable {
       /** Maximum allowed numerical error. */
       private static final double DEFAULT_EPSILON = 10e-9;
   
  
  
  
  1.4       +4 -2      jakarta-commons/math/src/java/org/apache/commons/math/complex/Complex.java
  
  Index: Complex.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/complex/Complex.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Complex.java	14 Nov 2003 22:22:22 -0000	1.3
  +++ Complex.java	19 Nov 2003 03:28:25 -0000	1.4
  @@ -56,13 +56,15 @@
   
   package org.apache.commons.math.complex;
   
  +import java.io.Serializable;
  +
   /**
    * Reference:
    *   http://myweb.lmu.edu/dmsmith/ZMLIB.pdf
    * 
    * @version $Revision$ $Date$
    */
  -public class Complex {
  +public class Complex implements Serializable  {
   
       /** The square root of -1. */    
       public static final Complex I = new Complex(0.0, 1.0);
  
  
  
  1.12      +8 -1      jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java
  
  Index: StorelessUnivariateStatistic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/stat/univariate/StorelessUnivariateStatistic.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StorelessUnivariateStatistic.java	14 Nov 2003 22:22:21 -0000	1.11
  +++ StorelessUnivariateStatistic.java	19 Nov 2003 03:28:25 -0000	1.12
  @@ -81,6 +81,13 @@
        */
       double getResult();
   
  +    /**
  +     * Returns the current state of the statistic after the
  +     * last increment.
  +     * @return value of the statistic, Double.NaN if it
  +     * has been cleared or just instantiated.
  +     */
  +    double getN();
   
       /**
        * Clears all the internal state of the Statistic
  
  
  

---------------------------------------------------------------------
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