You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2014/10/15 09:14:30 UTC

[1/5] git commit: Updated the class description

Repository: commons-math
Updated Branches:
  refs/heads/master a3fdeb4da -> d26810c0d


Updated the class description


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/4cb944ea
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/4cb944ea
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/4cb944ea

Branch: refs/heads/master
Commit: 4cb944ea687d84a54d679fc3f5362e2950551ff3
Parents: 69273dc
Author: Ole <ol...@gmail.com>
Authored: Thu Oct 9 10:13:31 2014 -0500
Committer: Ole <ol...@gmail.com>
Committed: Thu Oct 9 10:13:31 2014 -0500

----------------------------------------------------------------------
 .../commons/math3/exception/MathIllegalStateException.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/4cb944ea/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java b/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
index 22f8812..f47359c 100644
--- a/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
+++ b/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
@@ -22,8 +22,9 @@ import org.apache.commons.math3.exception.util.ExceptionContext;
 import org.apache.commons.math3.exception.util.ExceptionContextProvider;
 
 /**
- * Base class for all exceptions that signal a mismatch between the
- * current state and the user's expectations.
+ * Base class for all exceptions that signal that the process 
+ * throwing the exception is in a state that does not comply with
+ * the set of states the it is designed to be in.
  *
  * @since 2.2
  */


[4/5] git commit: Whitespace.

Posted by lu...@apache.org.
Whitespace.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/f5a8bf39
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/f5a8bf39
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/f5a8bf39

Branch: refs/heads/master
Commit: f5a8bf398c84bd4cdeea740c1a5b7b39cac4f777
Parents: fc7eeb4
Author: Luc Maisonobe <lu...@apache.org>
Authored: Wed Oct 15 09:05:22 2014 +0200
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Wed Oct 15 09:05:22 2014 +0200

----------------------------------------------------------------------
 .../apache/commons/math3/exception/MathIllegalStateException.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/f5a8bf39/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java b/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
index f47359c..2bb4a71 100644
--- a/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
+++ b/src/main/java/org/apache/commons/math3/exception/MathIllegalStateException.java
@@ -22,7 +22,7 @@ import org.apache.commons.math3.exception.util.ExceptionContext;
 import org.apache.commons.math3.exception.util.ExceptionContextProvider;
 
 /**
- * Base class for all exceptions that signal that the process 
+ * Base class for all exceptions that signal that the process
  * throwing the exception is in a state that does not comply with
  * the set of states the it is designed to be in.
  *


[3/5] git commit: Merge remote-tracking branch 'oleersoy/master'

Posted by lu...@apache.org.
Merge remote-tracking branch 'oleersoy/master'

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/fc7eeb48
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/fc7eeb48
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/fc7eeb48

Branch: refs/heads/master
Commit: fc7eeb4801b1ea7524b9329d5584c2e5ed945913
Parents: a3fdeb4 0dec6e7
Author: Luc Maisonobe <lu...@apache.org>
Authored: Wed Oct 15 09:02:58 2014 +0200
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Wed Oct 15 09:02:58 2014 +0200

----------------------------------------------------------------------
 .../exception/MathIllegalStateException.java    |  5 +++--
 .../AbstractIntegerDistributionTest.java        | 21 +++++++++++++++++++-
 2 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[5/5] git commit: Added Ole Ersoy to the contributors list.

Posted by lu...@apache.org.
Added Ole Ersoy to the contributors list.

Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d26810c0
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d26810c0
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d26810c0

Branch: refs/heads/master
Commit: d26810c0d98bacce22363ad6ec327eebeb1afacf
Parents: f5a8bf3
Author: Luc Maisonobe <lu...@apache.org>
Authored: Wed Oct 15 09:13:36 2014 +0200
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Wed Oct 15 09:13:36 2014 +0200

----------------------------------------------------------------------
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/d26810c0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 3a62e60..8430131 100644
--- a/pom.xml
+++ b/pom.xml
@@ -204,6 +204,9 @@
       <name>Ted Dunning</name>
     </contributor>
     <contributor>
+      <name>Ole Ersoy</name>
+    </contributor>
+    <contributor>
       <name>Ajo Fod</name>
     </contributor>
     <contributor>


[2/5] git commit: Corrected variance (Thanks Thomas) and added tests for inverseCumulativeProbability

Posted by lu...@apache.org.
Corrected variance (Thanks Thomas) and added tests for inverseCumulativeProbability


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/0dec6e76
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/0dec6e76
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/0dec6e76

Branch: refs/heads/master
Commit: 0dec6e76fb544fa3e8bf5fd17f16314735971dd7
Parents: 4cb944e
Author: Ole <ol...@gmail.com>
Authored: Fri Oct 10 17:24:57 2014 -0500
Committer: Ole <ol...@gmail.com>
Committed: Fri Oct 10 17:24:57 2014 -0500

----------------------------------------------------------------------
 .../AbstractIntegerDistributionTest.java        | 21 +++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/0dec6e76/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java b/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
index 97ea5a0..d6f668b 100644
--- a/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
+++ b/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
@@ -28,6 +28,25 @@ public class AbstractIntegerDistributionTest {
     protected final double p = diceDistribution.probability(1);
 
     @Test
+    public void testInverseCumulativeProbabilityMethod()
+    {
+    	double precision = 0.000000000000001;
+    	Assert.assertEquals(1, diceDistribution.inverseCumulativeProbability(0));
+    	Assert.assertEquals(1, diceDistribution.inverseCumulativeProbability((1d-Double.MIN_VALUE)/6d));
+    	Assert.assertEquals(2, diceDistribution.inverseCumulativeProbability((1d+precision)/6d));
+    	Assert.assertEquals(2, diceDistribution.inverseCumulativeProbability((2d-Double.MIN_VALUE)/6d));
+    	Assert.assertEquals(3, diceDistribution.inverseCumulativeProbability((2d+precision)/6d));
+    	Assert.assertEquals(3, diceDistribution.inverseCumulativeProbability((3d-Double.MIN_VALUE)/6d));
+    	Assert.assertEquals(4, diceDistribution.inverseCumulativeProbability((3d+precision)/6d));
+    	Assert.assertEquals(4, diceDistribution.inverseCumulativeProbability((4d-Double.MIN_VALUE)/6d));
+    	Assert.assertEquals(5, diceDistribution.inverseCumulativeProbability((4d+precision)/6d));
+    	Assert.assertEquals(5, diceDistribution.inverseCumulativeProbability((5d-precision)/6d));//Can't use Double.MIN
+    	Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((5d+precision)/6d));
+    	Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((6d-precision)/6d));//Can't use Double.MIN
+    	Assert.assertEquals(6, diceDistribution.inverseCumulativeProbability((6d)/6d));
+    }
+
+    @Test
     public void testCumulativeProbabilitiesSingleArguments() {
         for (int i = 1; i < 7; i++) {
             Assert.assertEquals(p * i,
@@ -90,7 +109,7 @@ public class AbstractIntegerDistributionTest {
         }
 
         public double getNumericalVariance() {
-            return 12.5 - 3.5 * 3.5;  // E(X^2) - E(X)^2
+            return 70/24;  // E(X^2) - E(X)^2
         }
 
         public int getSupportLowerBound() {