commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1534378 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GeometricDistributionTest.java
Date Mon, 21 Oct 2013 21:17:07 GMT
Author: tn
Date: Mon Oct 21 21:17:06 2013
New Revision: 1534378

URL: http://svn.apache.org/r1534378
Log:
Add reference test values for GeometricDistribution.logProbability.

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

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GeometricDistributionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GeometricDistributionTest.java?rev=1534378&r1=1534377&r2=1534378&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GeometricDistributionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/GeometricDistributionTest.java
Mon Oct 21 21:17:06 2013
@@ -66,6 +66,24 @@ public class GeometricDistributionTest e
         };
     }
 
+    /**
+     * Creates the default log probability density test expected values.
+     * Reference values are from R, version version 2.14.1.
+     */
+    @Override
+    public double[] makeLogDensityTestValues() {
+        return new double[] {
+            Double.NEGATIVE_INFINITY, -0.916290731874155, -1.42711635564015, -1.93794197940614,
+            -2.44876760317213, -2.95959322693812, -3.47041885070411, -3.9812444744701,
+            -4.49207009823609, -5.00289572200208, -5.51372134576807, -6.02454696953406,
+            -6.53537259330005, -7.04619821706604, -7.55702384083203, -8.06784946459802,
+            -8.57867508836402, -9.08950071213001, -9.600326335896, -10.111151959662,
+            -10.621977583428, -11.132803207194, -11.64362883096, -12.154454454726,
+            -12.6652800784919, -13.1761057022579, -13.6869313260239, -14.1977569497899,
+            -14.7085825735559, -15.2194081973219
+        };
+    }
+
     /** Creates the default cumulative probability density test input values */
     @Override
     public int[] makeCumulativeTestPoints() {



Mime
View raw message