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 2021/06/29 23:18:23 UTC
[commons-rng] branch master updated: Use new
ZigguratNormalizedGaussianSampler(rng)
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
The following commit(s) were added to refs/heads/master by this push:
new 2b742db Use new ZigguratNormalizedGaussianSampler(rng)
2b742db is described below
commit 2b742dbe2128f7f5b1c0e7af6c13063be25b66bd
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Wed Jun 30 00:18:19 2021 +0100
Use new ZigguratNormalizedGaussianSampler(rng)
Use of the factory constructor does not compile on JDK 1.6.
---
.../org/apache/commons/rng/sampling/distribution/LevySampler.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LevySampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LevySampler.java
index 8a5b02c..f604604 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LevySampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/LevySampler.java
@@ -42,7 +42,7 @@ public final class LevySampler implements SharedStateContinuousSampler {
private LevySampler(UniformRandomProvider rng,
double location,
double scale) {
- this.gaussian = ZigguratNormalizedGaussianSampler.of(rng);
+ this.gaussian = new ZigguratNormalizedGaussianSampler(rng);
this.location = location;
this.scale = scale;
this.rng = rng;
@@ -54,7 +54,7 @@ public final class LevySampler implements SharedStateContinuousSampler {
*/
private LevySampler(UniformRandomProvider rng,
LevySampler source) {
- this.gaussian = ZigguratNormalizedGaussianSampler.of(rng);
+ this.gaussian = new ZigguratNormalizedGaussianSampler(rng);
this.location = source.location;
this.scale = source.scale;
this.rng = rng;