commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary ProductTest.java SumLogTest.java SumSqTest.java SumTest.java
Date Thu, 17 Jun 2004 21:37:05 GMT
psteitz     2004/06/17 14:37:05

  Modified:    math/src/test/org/apache/commons/math/stat/univariate/moment
                        FirstMomentTest.java GeometricMeanTest.java
                        KurtosisTest.java MeanTest.java SkewnessTest.java
                        StandardDeviationTest.java VarianceTest.java
               math/src/test/org/apache/commons/math/stat/univariate/rank
                        MaxTest.java MedianTest.java MinTest.java
                        PercentileTest.java
               math/src/test/org/apache/commons/math/stat/univariate/summary
                        ProductTest.java SumLogTest.java SumSqTest.java
                        SumTest.java
  Log:
  Changed getUnivariateStatistic() implementation to return a new instance (so tests can use
multiple instances).
  
  Revision  Changes    Path
  1.2       +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/FirstMomentTest.java
  
  Index: FirstMomentTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/FirstMomentTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FirstMomentTest.java	27 Apr 2004 16:42:33 -0000	1.1
  +++ FirstMomentTest.java	17 Jun 2004 21:37:05 -0000	1.2
  @@ -38,11 +38,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new FirstMoment();
  -            
  -        return stat;
  +        return new FirstMoment();
       }
   
       /**
  
  
  
  1.10      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java
  
  Index: GeometricMeanTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/GeometricMeanTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- GeometricMeanTest.java	21 Feb 2004 21:35:18 -0000	1.9
  +++ GeometricMeanTest.java	17 Jun 2004 21:37:05 -0000	1.10
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new GeometricMean();
  -            
  -        return stat;
  +        return new GeometricMean();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java
  
  Index: KurtosisTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/KurtosisTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KurtosisTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ KurtosisTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Kurtosis();
  -            
  -        return stat;
  +        return new Kurtosis();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java
  
  Index: MeanTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/MeanTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MeanTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ MeanTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Mean();
  -            
  -        return stat;
  +        return new Mean();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java
  
  Index: SkewnessTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/SkewnessTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SkewnessTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ SkewnessTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -41,11 +41,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Skewness();
  -            
  -        return stat;
  +        return new Skewness();
       }
   
       public static Test suite() {
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java
  
  Index: StandardDeviationTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/StandardDeviationTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- StandardDeviationTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ StandardDeviationTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -41,11 +41,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new StandardDeviation();
  -            
  -        return stat;
  +        return new StandardDeviation();
       }
   
       public static Test suite() {
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java
  
  Index: VarianceTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/moment/VarianceTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- VarianceTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ VarianceTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -41,11 +41,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Variance();
  -            
  -        return stat;
  +        return new Variance();
       }
   
       public static Test suite() {
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java
  
  Index: MaxTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MaxTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MaxTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ MaxTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Max();
  -            
  -        return stat;
  +        return new Max();
       }
   
       /* (non-Javadoc)
  
  
  
  1.10      +3 -7      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java
  
  Index: MedianTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MedianTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MedianTest.java	21 Feb 2004 21:35:18 -0000	1.9
  +++ MedianTest.java	17 Jun 2004 21:37:05 -0000	1.10
  @@ -45,12 +45,8 @@
       /* (non-Javadoc)
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
  -    public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Median();
  -            
  -        return stat;
  +    public UnivariateStatistic getUnivariateStatistic() {  
  +        return new Median();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java
  
  Index: MinTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/MinTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MinTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ MinTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Min();
  -            
  -        return stat;
  +        return new Min();
       }
   
       /* (non-Javadoc)
  
  
  
  1.13      +3 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java
  
  Index: PercentileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/rank/PercentileTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- PercentileTest.java	21 Mar 2004 04:26:54 -0000	1.12
  +++ PercentileTest.java	17 Jun 2004 21:37:05 -0000	1.13
  @@ -45,11 +45,8 @@
       /* (non-Javadoc)
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
  -    public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Percentile(95.0);         
  -        return stat;
  +    public UnivariateStatistic getUnivariateStatistic() {   
  +        return new Percentile(95.0);
       }
   
       /* (non-Javadoc)
  
  
  
  1.12      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java
  
  Index: ProductTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/ProductTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ProductTest.java	21 Mar 2004 04:29:20 -0000	1.11
  +++ ProductTest.java	17 Jun 2004 21:37:05 -0000	1.12
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Product();
  -            
  -        return stat;
  +        return new Product();
       }
   
       public double getTolerance() {
  
  
  
  1.11      +3 -7      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java
  
  Index: SumLogTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumLogTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SumLogTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ SumLogTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -45,12 +45,8 @@
       /* (non-Javadoc)
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
  -    public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new SumOfLogs();
  -            
  -        return stat;
  +    public UnivariateStatistic getUnivariateStatistic() {        
  +        return new SumOfLogs();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java
  
  Index: SumSqTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumSqTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SumSqTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ SumSqTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new SumOfSquares();
  -            
  -        return stat;
  +        return new SumOfSquares();
       }
   
       /* (non-Javadoc)
  
  
  
  1.11      +2 -6      jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java
  
  Index: SumTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/stat/univariate/summary/SumTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SumTest.java	21 Feb 2004 21:35:18 -0000	1.10
  +++ SumTest.java	17 Jun 2004 21:37:05 -0000	1.11
  @@ -46,11 +46,7 @@
        * @see org.apache.commons.math.stat.univariate.UnivariateStatisticAbstractTest#getUnivariateStatistic()
        */
       public UnivariateStatistic getUnivariateStatistic() {
  -       
  -        if(stat == null)
  -            stat = new Sum();
  -            
  -        return stat;
  +        return new Sum();      
       }
   
       /* (non-Javadoc)
  
  
  

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