commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [27/50] commons-rng git commit: Add unit test.
Date Tue, 29 Nov 2016 11:32:38 GMT
Add 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/82a9f734
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/82a9f734
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/82a9f734

Branch: refs/heads/1.0-release
Commit: 82a9f7346e4bf937cfd6be00d9b17c9161e8ce75
Parents: ccbcb5f
Author: Gilles <erans@apache.org>
Authored: Sun Nov 27 06:25:42 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Sun Nov 27 06:25:42 2016 +0100

----------------------------------------------------------------------
 .../rng/sampling/distribution/DiscreteSamplersList.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/82a9f734/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
index 59fc941..994329f 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplersList.java
@@ -109,11 +109,16 @@ public class DiscreteSamplersList {
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(meanPoisson),
                 MathArrays.sequence(10, 0, 1),
                 new PoissonSampler(RandomSource.create(RandomSource.KISS), meanPoisson));
-            // Poisson (mean > 40).
-            final double largeMeanPoisson = 543.21;
+            // Poisson (40 < mean < 80).
+            final double largeMeanPoisson = 67.89;
             add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(largeMeanPoisson),
                 MathArrays.sequence(100, (int) (largeMeanPoisson - 50), 1),
                 new PoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), largeMeanPoisson));
+            // Poisson (mean >> 40).
+            final double veryLargeMeanPoisson = 543.21;
+            add(LIST, new org.apache.commons.math3.distribution.PoissonDistribution(veryLargeMeanPoisson),
+                MathArrays.sequence(100, (int) (veryLargeMeanPoisson - 50), 1),
+                new PoissonSampler(RandomSource.create(RandomSource.SPLIT_MIX_64), veryLargeMeanPoisson));
         } catch (Exception e) {
             System.err.println("Unexpected exception while creating the list of samplers:
" + e);
             e.printStackTrace(System.err);


Mime
View raw message