commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [5/6] commons-rng git commit: RNG-35: Unit testing of "BoxMullerNormalizedGaussianSampler".
Date Mon, 23 Jan 2017 23:23:10 GMT
RNG-35: Unit testing of "BoxMullerNormalizedGaussianSampler".


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

Branch: refs/heads/feature__RNG-35
Commit: 3b4b798f7e344774f3f3c4f4abbf8fb2242fd9e8
Parents: 82476df
Author: Gilles <erans@apache.org>
Authored: Tue Jan 24 00:17:43 2017 +0100
Committer: Gilles <erans@apache.org>
Committed: Tue Jan 24 00:17:43 2017 +0100

----------------------------------------------------------------------
 .../rng/sampling/distribution/ContinuousSamplersList.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/3b4b798f/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
index 0cdf0b6..c24e786 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplersList.java
@@ -41,9 +41,13 @@ public class ContinuousSamplersList {
             final double sigmaNormal = 6.789;
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(meanNormal,
sigmaNormal),
                 RandomSource.create(RandomSource.KISS));
-            // Gaussian ("Box-Muller").
+            // Gaussian (DEPRECATED "Box-Muller").
             add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(meanNormal,
sigmaNormal),
                 new BoxMullerGaussianSampler(RandomSource.create(RandomSource.MT), meanNormal,
sigmaNormal));
+            // Gaussian ("Box-Muller").
+            add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(meanNormal,
sigmaNormal),
+                new GaussianSampler(new BoxMullerNormalizedGaussianSampler(RandomSource.create(RandomSource.MT)),
+                                    meanNormal, sigmaNormal));
 
             // Beta ("inverse method").
             final double alphaBeta = 4.3;


Mime
View raw message