commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1605776 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math3/stat/descriptive/rank/ test/java/org/apache/commons/math3/stat/descriptive/rank/
Date Thu, 26 Jun 2014 13:05:24 GMT
Author: erans
Date: Thu Jun 26 13:05:24 2014
New Revision: 1605776

URL: http://svn.apache.org/r1605776
Log:
Typo.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java?rev=1605776&r1=1605775&r2=1605776&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Median.java
Thu Jun 26 13:05:24 2014
@@ -80,7 +80,7 @@ public class Median extends Percentile i
 
     /** {@inheritDoc} */
     @Override
-    public Median withEstimationtype(final EstimationType newEstimationType) {
+    public Median withEstimationType(final EstimationType newEstimationType) {
         return new Median(newEstimationType, getNaNStrategy(), getPivotingStrategy());
     }
 

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java?rev=1605776&r1=1605775&r2=1605776&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/descriptive/rank/Percentile.java
Thu Jun 26 13:05:24 2014
@@ -590,7 +590,7 @@ public class Percentile extends Abstract
      * @return a new instance, with changed pivoting strategy
      * @throws NullArgumentException when pivotingStrategy is null
      */
-    public Percentile withEstimationtype(final EstimationType newEstimationType) {
+    public Percentile withEstimationType(final EstimationType newEstimationType) {
         return new Percentile(quantile, newEstimationType, nanStrategy, pivotingStrategy);
     }
 

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java?rev=1605776&r1=1605775&r2=1605776&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/MedianTest.java
Thu Jun 26 13:05:24 2014
@@ -60,7 +60,7 @@ public class MedianTest extends Univaria
 
     private Median getTestMedian(EstimationType type) {
         NaNStrategy strategy = (type == LEGACY) ? NaNStrategy.FIXED : NaNStrategy.REMOVED;
-        return new Median().withEstimationtype(type).withNaNStrategy(strategy);
+        return new Median().withEstimationType(type).withNaNStrategy(strategy);
     }
 
     /**

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java?rev=1605776&r1=1605775&r2=1605776&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/stat/descriptive/rank/PercentileTest.java
Thu Jun 26 13:05:24 2014
@@ -90,7 +90,7 @@ public class PercentileTest extends Univ
     @Override
     public Percentile getUnivariateStatistic() {
         return new Percentile(quantile).
-                withEstimationtype(type).
+                withEstimationType(type).
                 withNaNStrategy(nanStrategy).
                 withPivotingStrategy(pivotingStrategy);
     }
@@ -776,10 +776,10 @@ public class PercentileTest extends Univ
     @Test
     public void testNanStrategySpecific() {
         double[] specialValues = new double[] { 0d, 1d, 2d, 3d, 4d, Double.NaN };
-        Assert.assertTrue(Double.isNaN(new Percentile(50d).withEstimationtype(Percentile.EstimationType.LEGACY).withNaNStrategy(NaNStrategy.MAXIMAL).evaluate(specialValues,
3, 3)));
-        Assert.assertEquals(2d,new Percentile(50d).withEstimationtype(Percentile.EstimationType.R_1).withNaNStrategy(NaNStrategy.REMOVED).evaluate(specialValues),0d);
-        Assert.assertEquals(Double.NaN,new Percentile(50d).withEstimationtype(Percentile.EstimationType.R_5).withNaNStrategy(NaNStrategy.REMOVED).evaluate(new
double[] {Double.NaN,Double.NaN,Double.NaN}),0d);
-        Assert.assertEquals(50d,new Percentile(50d).withEstimationtype(Percentile.EstimationType.R_7).withNaNStrategy(NaNStrategy.MINIMAL).evaluate(new
double[] {50d,50d,50d},1,2),0d);
+        Assert.assertTrue(Double.isNaN(new Percentile(50d).withEstimationType(Percentile.EstimationType.LEGACY).withNaNStrategy(NaNStrategy.MAXIMAL).evaluate(specialValues,
3, 3)));
+        Assert.assertEquals(2d,new Percentile(50d).withEstimationType(Percentile.EstimationType.R_1).withNaNStrategy(NaNStrategy.REMOVED).evaluate(specialValues),0d);
+        Assert.assertEquals(Double.NaN,new Percentile(50d).withEstimationType(Percentile.EstimationType.R_5).withNaNStrategy(NaNStrategy.REMOVED).evaluate(new
double[] {Double.NaN,Double.NaN,Double.NaN}),0d);
+        Assert.assertEquals(50d,new Percentile(50d).withEstimationType(Percentile.EstimationType.R_7).withNaNStrategy(NaNStrategy.MINIMAL).evaluate(new
double[] {50d,50d,50d},1,2),0d);
     }
 
     // Some NaNStrategy specific testing
@@ -788,7 +788,7 @@ public class PercentileTest extends Univ
         double[] specialValues =
                 new double[] { 0d, 1d, 2d, 3d, 4d, Double.NaN };
         new Percentile(50d).
-        withEstimationtype(Percentile.EstimationType.R_9).
+        withEstimationType(Percentile.EstimationType.R_9).
         withNaNStrategy(NaNStrategy.FAILED).
         evaluate(specialValues, 3, 3);
     }
@@ -798,7 +798,7 @@ public class PercentileTest extends Univ
         double[] specialValues =
                 new double[] { 0d, 1d, 2d, 3d, 4d, Double.NaN };
         try {
-            new Percentile(50d).withEstimationtype(Percentile.EstimationType.LEGACY).withNaNStrategy(null);
+            new Percentile(50d).withEstimationType(Percentile.EstimationType.LEGACY).withNaNStrategy(null);
             Assert.fail("Expecting NullArgumentArgumentException "
                     + "for null Nan Strategy");
         } catch (NullArgumentException ex) {
@@ -848,7 +848,7 @@ public class PercentileTest extends Univ
             Percentile.EstimationType e = (Percentile.EstimationType) o[0];
             double expected = (Double) o[1];
             try {
-                double result = new Percentile(p).withEstimationtype(e).withNaNStrategy(nanStrategy).evaluate(data);
+                double result = new Percentile(p).withEstimationType(e).withNaNStrategy(nanStrategy).evaluate(data);
                 Assert.assertEquals("expected[" + e + "] = " + expected +
                     " but was = " + result, expected, result, tolerance);
             }catch(Exception ex) {



Mime
View raw message