commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [13/14] commons-rng git commit: Increase coverage (unit test).
Date Thu, 17 Nov 2016 18:10:16 GMT
Increase coverage (unit test).


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

Branch: refs/heads/RNG-30__sampling
Commit: 86ed5262836d20a51ec301b9cb8c0466b70fb200
Parents: f631ab5
Author: Gilles <erans@apache.org>
Authored: Thu Nov 17 19:02:59 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Thu Nov 17 19:02:59 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/86ed5262/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 306ef0c..76d6510 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
@@ -53,6 +53,11 @@ public class ContinuousSamplersList {
             // Beta ("Cheng").
             add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(alphaBeta,
betaBeta),
                 new ChengBetaSampler(RandomSource.create(RandomSource.MWC_256), alphaBeta,
betaBeta));
+            // Beta ("Cheng", alternate algorithm).
+            final double alphaBetaAlt = 0.5678;
+            final double betaBetaAlt = 0.1234;
+            add(LIST, new org.apache.commons.math3.distribution.BetaDistribution(alphaBetaAlt,
betaBetaAlt),
+                new ChengBetaSampler(RandomSource.create(RandomSource.WELL_512_A), alphaBetaAlt,
betaBetaAlt));
 
             // Cauchy ("inverse method").
             final double medianCauchy = 0.123;
@@ -104,7 +109,7 @@ public class ContinuousSamplersList {
             final double muLaplace = 12.3;
             final double betaLaplace = 5.6;
             add(LIST, new org.apache.commons.math3.distribution.LaplaceDistribution(muLaplace,
betaLaplace),
-                RandomSource.create(RandomSource.WELL_1024_A));
+                RandomSource.create(RandomSource.MWC_256));
 
             // Levy ("inverse method").
             final double muLevy = -1.098;


Mime
View raw message