commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [07/24] commons-rng git commit: Variables renamed (in unit test).
Date Sat, 12 Nov 2016 19:53:19 GMT
Variables renamed (in 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/fc5d7b51
Tree: http://git-wip-us.apache.org/repos/asf/commons-rng/tree/fc5d7b51
Diff: http://git-wip-us.apache.org/repos/asf/commons-rng/diff/fc5d7b51

Branch: refs/heads/RNG-30__sampling
Commit: fc5d7b51454fee8a07fbe02e80a67696f43570ac
Parents: 4289ed4
Author: Gilles <erans@apache.org>
Authored: Fri Nov 11 04:18:47 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Fri Nov 11 04:18:47 2016 +0100

----------------------------------------------------------------------
 .../distribution/ContinuousSamplersList.java        | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/fc5d7b51/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 a1f5ce1..ddc1eac 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
@@ -38,17 +38,15 @@ public class ContinuousSamplersList {
         try {
             // List of distributions to test.
 
-            // 1. Gaussian
-            // 1.a Using the "inverse method".
-            final double mean = -123.45;
-            final double sigma = 6.789;
-            add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(mean,
sigma),
+            // Gaussian ("inverse method").
+            final double meanNormal = -123.45;
+            final double sigmaNormal = 6.789;
+            add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(meanNormal,
sigmaNormal),
                 RandomSource.create(RandomSource.KISS));
-            // 1.b Using "Box-Muller".
-            add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(mean,
sigma),
-                new BoxMullerGaussianSampler(mean, sigma, RandomSource.create(RandomSource.MT)));
+            // Gaussian ("Box-Muller").
+            add(LIST, new org.apache.commons.math3.distribution.NormalDistribution(meanNormal,
sigmaNormal),
+                new BoxMullerGaussianSampler(meanNormal, sigmaNormal, RandomSource.create(RandomSource.MT)));
 
-            // 2. 
         } catch (Exception e) {
             System.err.println("Unexpected exception while creating the list of samplers:
" + e);
             e.printStackTrace(System.err);


Mime
View raw message