commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1369420 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
Date Sat, 04 Aug 2012 19:40:03 GMT
Author: erans
Date: Sat Aug  4 19:40:03 2012
New Revision: 1369420

URL: http://svn.apache.org/viewvc?rev=1369420&view=rev
Log:
MATH-839
Indicating changes that cannot be performed before 4.0 (new method
"probability(double,double)" can be only added to the interface in
a major release).

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java?rev=1369420&r1=1369419&r2=1369420&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/RealDistributionAbstractTest.java
Sat Aug  4 19:40:03 2012
@@ -153,6 +153,7 @@ public abstract class RealDistributionAb
                 getTolerance());
         }
         // verify cumulativeProbability(double, double)
+        // XXX In 4.0, "cumulativeProbability(double,double)" must be replaced with "probability"
(MATH-839).
         for (int i = 0; i < cumulativeTestPoints.length; i++) {
             for (int j = 0; j < cumulativeTestPoints.length; j++) {
                 if (cumulativeTestPoints[i] <= cumulativeTestPoints[j]) {
@@ -233,6 +234,7 @@ public abstract class RealDistributionAb
         for (int i=1; i < cumulativeTestPoints.length; i++) {
 
             // check that cdf(x, x) = 0
+            // XXX In 4.0, "cumulativeProbability(double,double)" must be replaced with "probability"
(MATH-839).
             TestUtils.assertEquals(0d,
                distribution.cumulativeProbability
                  (cumulativeTestPoints[i], cumulativeTestPoints[i]), tolerance);
@@ -242,6 +244,7 @@ public abstract class RealDistributionAb
             double lower = FastMath.min(cumulativeTestPoints[i], cumulativeTestPoints[i -1]);
             double diff = distribution.cumulativeProbability(upper) -
                 distribution.cumulativeProbability(lower);
+            // XXX In 4.0, "cumulativeProbability(double,double)" must be replaced with "probability"
(MATH-839).
             double direct = distribution.cumulativeProbability(lower, upper);
             TestUtils.assertEquals("Inconsistent cumulative probabilities for ("
                     + lower + "," + upper + ")", diff, direct, tolerance);
@@ -254,6 +257,7 @@ public abstract class RealDistributionAb
     @Test
     public void testIllegalArguments() {
         try {
+            // XXX In 4.0, "cumulativeProbability(double,double)" must be replaced with "probability"
(MATH-839).
             distribution.cumulativeProbability(1, 0);
             Assert.fail("Expecting MathIllegalArgumentException for bad cumulativeProbability
interval");
         } catch (MathIllegalArgumentException ex) {



Mime
View raw message