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 2019/05/08 15:02:19 UTC
[commons-rng] branch master updated: Corrected reference for the
SmallMeanPoissonSampler.
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 0df5c9b Corrected reference for the SmallMeanPoissonSampler.
0df5c9b is described below
commit 0df5c9b29bb9f939c23ebca1e1e3a3c625e4a84e
Author: aherbert <ah...@apache.org>
AuthorDate: Wed May 8 16:02:14 2019 +0100
Corrected reference for the SmallMeanPoissonSampler.
The previously linked web page is no longer available.
---
.../commons/rng/sampling/distribution/PoissonSampler.java | 10 +++++++---
.../rng/sampling/distribution/SmallMeanPoissonSampler.java | 13 +++++++++----
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/PoissonSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/PoissonSampler.java
index d2da6f0..56472ad 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/PoissonSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/PoissonSampler.java
@@ -23,9 +23,13 @@ import org.apache.commons.rng.UniformRandomProvider;
*
* <ul>
* <li>
- * For small means, a Poisson process is simulated using uniform deviates, as
- * described <a href="http://mathaa.epfl.ch/cours/PMMI2001/interactive/rng7.htm">here</a>.
- * The Poisson process (and hence, the returned value) is bounded by 1000 * mean.
+ * For small means, a Poisson process is simulated using uniform deviates, as described in
+ * <blockquote>
+ * Knuth (1969). <i>Seminumerical Algorithms</i>. The Art of Computer Programming,
+ * Volume 2. Chapter 3.4.1.F.3 Important integer-valued distributions: The Poisson distribution.
+ * Addison Wesley.
+ * </blockquote>
+ * The Poisson process (and hence, the returned value) is bounded by {@code 1000 * mean}.
* </li>
* <li>
* For large means, we use the rejection algorithm described in
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSampler.java
index 9e920bd..22b7864 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/SmallMeanPoissonSampler.java
@@ -23,16 +23,21 @@ import org.apache.commons.rng.UniformRandomProvider;
*
* <ul>
* <li>
- * For small means, a Poisson process is simulated using uniform deviates, as
- * described <a href="http://mathaa.epfl.ch/cours/PMMI2001/interactive/rng7.htm">here</a>.
- * The Poisson process (and hence, the returned value) is bounded by 1000 * mean.
+ * For small means, a Poisson process is simulated using uniform deviates, as described in
+ * <blockquote>
+ * Knuth (1969). <i>Seminumerical Algorithms</i>. The Art of Computer Programming,
+ * Volume 2. Chapter 3.4.1.F.3 Important integer-valued distributions: The Poisson distribution.
+ * Addison Wesley.
+ * </blockquote>
+ * The Poisson process (and hence, the returned value) is bounded by {@code 1000 * mean}.
* </li>
* </ul>
*
* <p>This sampler is suitable for {@code mean < 40}.
* For large means, {@link LargeMeanPoissonSampler} should be used instead.</p>
*
- * <p>Sampling uses {@link UniformRandomProvider#nextDouble()}.</p>
+ * <p>Sampling uses {@link UniformRandomProvider#nextDouble()} and requires on average
+ * {@code mean + 1} deviates per sample.</p>
*
* @since 1.1
*/