You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2021/07/04 08:28:57 UTC

[commons-rng] branch master updated: RNG-150: Updated to use the ZigguratExponentialSampler

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git


The following commit(s) were added to refs/heads/master by this push:
     new 0fb2eec  RNG-150: Updated to use the ZigguratExponentialSampler
0fb2eec is described below

commit 0fb2eec196a0d1b3e086c929d2903b5f9fae1228
Author: aherbert <ah...@apache.org>
AuthorDate: Sun Jul 4 09:28:54 2021 +0100

    RNG-150: Updated to use the ZigguratExponentialSampler
---
 .../commons/rng/sampling/distribution/LargeMeanPoissonSampler.java    | 4 ++--
 src/changes/changes.xml                                               | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSampler.java
index d568820..07614e4 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LargeMeanPoissonSampler.java
@@ -133,7 +133,7 @@ public class LargeMeanPoissonSampler
         this.rng = rng;
 
         gaussian = new ZigguratNormalizedGaussianSampler(rng);
-        exponential = AhrensDieterExponentialSampler.of(rng, 1);
+        exponential = ZigguratExponentialSampler.of(rng);
         // Plain constructor uses the uncached function.
         factorialLog = NO_CACHE_FACTORIAL_LOG;
 
@@ -178,7 +178,7 @@ public class LargeMeanPoissonSampler
         this.rng = rng;
 
         gaussian = new ZigguratNormalizedGaussianSampler(rng);
-        exponential = AhrensDieterExponentialSampler.of(rng, 1);
+        exponential = ZigguratExponentialSampler.of(rng);
         // Plain constructor uses the uncached function.
         factorialLog = NO_CACHE_FACTORIAL_LOG;
 
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a996b12..f382502 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -77,6 +77,9 @@ re-run tests that fail, and pass the build if they succeed
 within the allotted number of reruns (the test will be marked
 as 'flaky' in the report).
 ">
+      <action dev="aherbert" type="update" issue="150">
+        "LargeMeanPoissonSampler": Updated to use the ZigguratExponentialSampler.
+      </action>
       <action dev="aherbert" type="add" issue="149">
          New "ZigguratExponentialSampler" implementation of the "Ziggurat" algorithm for
          exponential sampling.