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/10/29 11:57:28 UTC

[commons-rng] 04/04: Updated user guide notes on the Gaussian sampler results.

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

commit d5a09c01eeaf81ff5341f0e1080b1844812ca061
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Oct 29 11:42:04 2019 +0000

    Updated user guide notes on the Gaussian sampler results.
---
 src/site/apt/userguide/rng.apt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/site/apt/userguide/rng.apt b/src/site/apt/userguide/rng.apt
index c4c47d7..5b76106 100644
--- a/src/site/apt/userguide/rng.apt
+++ b/src/site/apt/userguide/rng.apt
@@ -686,7 +686,7 @@ ListSampler.shuffle(rng, list)
   {{{../commons-rng-sampling/apidocs/org/apache/commons/rng/sampling/distribution/MarsagliaNormalizedGaussianSampler.html}MarsagliaNormalizedGaussianSampler}},
   and {{{../commons-rng-sampling/apidocs/org/apache/commons/rng/sampling/distribution/ZigguratNormalizedGaussianSampler.html}ZigguratNormalizedGaussianSampler}}.
 
-  Each score is normalized to the score of {{{https://docs.oracle.com/javase/8/docs/api/java/util/Random.html#nextGaussian--}nextGaussian()}} method of <<<java.util.Random>>>.
+  Each score is normalized to the score of {{{https://docs.oracle.com/javase/8/docs/api/java/util/Random.html#nextGaussian--}nextGaussian()}} method of <<<java.util.Random>>> which internally uses the Box-Muller algorithm.
 
 *-----------------------*---------*----------*---------*
 || RNG identifier       || <<<BoxMullerNormalizedGaussianSampler>>> || <<<MarsagliaNormalizedGaussianSampler>>> || <<<ZigguratNormalizedGaussianSampler>>> |
@@ -778,7 +778,9 @@ ListSampler.shuffle(rng, list)
 | XO_RO_SHI_RO_1024_SS  | 0.58185 | 0.33993 | 0.18551 |
 *-----------------------+---------:---------:---------:
 
-  Note that the reference <<<java.util.Random>>> nextGaussian() method uses the Box-Muller algorithm and a synchronized method call per sample. The <<<RandomSource.JDK>>> RNG will use 1 synchronized method call for two samples when using the <<<BoxMullerNormalizedGaussianSampler>>>, hence the observed difference. All the other RNGs are not synchronized.
+  Notes:
+
+  The reference <<<java.util.Random>>> nextGaussian() method uses synchronized method calls per sample. The <<<RandomSource.JDK>>> RNG will use synchronized method calls when generating numbers for the <<<BoxMullerNormalizedGaussianSampler>>> but the calls to obtain the samples are not synchronized, hence the observed difference. All the other RNGs are not synchronized.
 
 
 5. Quality