commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r1348015 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
Date Fri, 08 Jun 2012 10:41:50 GMT
Author: mikl
Date: Fri Jun  8 10:41:49 2012
New Revision: 1348015

URL: http://svn.apache.org/viewvc?rev=1348015&view=rev
Log:
MATH-774: Gamma Distribution override inversion sampling with nextGamma-implementation from
oacm.random

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java?rev=1348015&r1=1348014&r2=1348015&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
Fri Jun  8 10:41:49 2012
@@ -342,4 +342,10 @@ public class GammaDistribution extends A
     public boolean isSupportConnected() {
         return true;
     }
+
+    /** {@inheritDoc} */
+    @Override
+    public double sample()  {
+        return randomData.nextGamma(shape, scale);
+    }
 }



Mime
View raw message