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 c942b9e  Add explicit location and scale to Levy performance test
c942b9e is described below

commit c942b9e09eb2da74a198ea7701088692d7aa9b85
Author: aherbert <[email protected]>
AuthorDate: Tue Jun 29 15:52:36 2021 +0100

    Add explicit location and scale to Levy performance test
---
 .../examples/jmh/sampling/distribution/LevySamplersPerformance.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/LevySamplersPerformance.java
 
b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/LevySamplersPerformance.java
index ee3ba4b..a496933 100644
--- 
a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/LevySamplersPerformance.java
+++ 
b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/LevySamplersPerformance.java
@@ -95,13 +95,15 @@ public class LevySamplersPerformance {
         public void setup() {
             final RandomSource randomSource = 
RandomSource.valueOf(randomSourceName);
             final UniformRandomProvider rng = randomSource.create();
+            final double location = 0.0;
+            final double scale = 1.0;
             if ("LevySampler".equals(samplerType)) {
-                sampler = LevySampler.of(rng);
+                sampler = LevySampler.of(rng, location, scale);
             } else {
                 final ContinuousInverseCumulativeProbabilityFunction 
levyFunction =
                     new ContinuousInverseCumulativeProbabilityFunction() {
                         /** Use CM for the inverse CDF. null is for the unused 
RNG. */
-                        private final LevyDistribution dist = new 
LevyDistribution(null, 0.0, 1.0);
+                        private final LevyDistribution dist = new 
LevyDistribution(null, location, scale);
                         @Override
                         public double inverseCumulativeProbability(double p) {
                             return dist.inverseCumulativeProbability(p);

Reply via email to