You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2018/02/14 21:43:01 UTC

[1/5] commons-rng git commit: Missing sub-directory.

Repository: commons-rng
Updated Branches:
  refs/heads/master 857cbb05c -> 64439c25a


Missing sub-directory.


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

Branch: refs/heads/master
Commit: 20f33fb6b43d83176cef0c568ad35b851c5e239d
Parents: 857cbb0
Author: Gilles <er...@apache.org>
Authored: Wed Feb 14 17:30:40 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 14 17:30:40 2018 +0100

----------------------------------------------------------------------
 .../rng/examples/jmh/GenerationPerformance.java | 194 ++++++++++++++
 .../distribution/NextGaussianPerformance.java   |  68 +++++
 .../jmh/distribution/SamplersPerformance.java   | 264 +++++++++++++++++++
 .../examples/jmh/distribution/package-info.java |  22 ++
 .../commons/rng/examples/jmh/package-info.java  |  27 ++
 .../commons/rng/jmh/GenerationPerformance.java  | 194 --------------
 .../distribution/NextGaussianPerformance.java   |  68 -----
 .../jmh/distribution/SamplersPerformance.java   | 264 -------------------
 .../rng/jmh/distribution/package-info.java      |  22 --
 .../apache/commons/rng/jmh/package-info.java    |  27 --
 10 files changed, 575 insertions(+), 575 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/GenerationPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/GenerationPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/GenerationPerformance.java
new file mode 100644
index 0000000..c22cf7c
--- /dev/null
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/GenerationPerformance.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.rng.examples.jmh;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Param;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.infra.Blackhole;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.simple.RandomSource;
+
+/**
+ * Executes benchmark to compare the speed of generation of random numbers
+ * from the various source providers.
+ */
+@BenchmarkMode(Mode.AverageTime)
+@OutputTimeUnit(TimeUnit.MICROSECONDS)
+@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@State(Scope.Benchmark)
+@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
+public class GenerationPerformance {
+    /**
+     * The benchmark state (retrieve the various "RandomSource"s).
+     */
+    @State(Scope.Benchmark)
+    public static class Sources {
+        /**
+         * RNG providers.
+         */
+        @Param({"JDK",
+                "WELL_512_A",
+                "WELL_1024_A",
+                "WELL_19937_A",
+                "WELL_19937_C",
+                "WELL_44497_A",
+                "WELL_44497_B",
+                "MT",
+                "ISAAC",
+                "SPLIT_MIX_64",
+                "MWC_256",
+                "KISS",
+                "XOR_SHIFT_1024_S",
+                "TWO_CMRES",
+                "MT_64" })
+        private String randomSourceName;
+
+        /** RNG. */
+        private UniformRandomProvider provider;
+
+        /**
+         * @return the RNG.
+         */
+        public UniformRandomProvider getGenerator() {
+            return provider;
+        }
+
+        /** Intantiates generator. */
+        @Setup
+        public void setup() {
+            final RandomSource randomSource = RandomSource.valueOf(randomSourceName);
+            provider = RandomSource.create(randomSource);
+        }
+    }
+
+    /**
+     * Number of random values to generate.
+     */
+    @Param({"1", "100", "10000", "1000000"})
+    private int numValues;
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextBoolean(Sources sources,
+                            Blackhole bh) {
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextBoolean());
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextInt(Sources sources,
+                        Blackhole bh) {
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextInt());
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextIntN(Sources sources,
+                         Blackhole bh) {
+        final int n = 10;
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextInt(n));
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextLong(Sources sources,
+                         Blackhole bh) {
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextLong());
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextLongN(Sources sources,
+                          Blackhole bh) {
+        final long n = 2L * Integer.MAX_VALUE;
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextLong(n));
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextFloat(Sources sources,
+                          Blackhole bh) {
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextFloat());
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextDouble(Sources sources,
+                           Blackhole bh) {
+        for (int i = 0; i < numValues; i++) {
+            bh.consume(sources.getGenerator().nextDouble());
+        }
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void nextBytes(Sources sources,
+                          Blackhole bh) {
+        final byte[] result = new byte[numValues];
+        sources.getGenerator().nextBytes(result);
+        bh.consume(result);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/NextGaussianPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/NextGaussianPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/NextGaussianPerformance.java
new file mode 100644
index 0000000..2b65432
--- /dev/null
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/NextGaussianPerformance.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.rng.examples.jmh.distribution;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.infra.Blackhole;
+import java.util.concurrent.TimeUnit;
+import java.util.Random;
+
+/**
+ * Benchmark for {@link Random#nextGaussian()} in order to compare
+ * the speed of generation of normally-distributed random numbers.
+ */
+@BenchmarkMode(Mode.AverageTime)
+@OutputTimeUnit(TimeUnit.MICROSECONDS)
+@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@State(Scope.Benchmark)
+@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
+public class NextGaussianPerformance {
+    /** Number of samples per run. */
+    private static final int NUM_SAMPLES = 10000000;
+    /** JDK's generator. */
+    private final Random random = new Random();
+    /**
+     * Exercises the JDK's Gaussian sampler.
+     *
+     * @param bh Data sink.
+     */
+    private void runSample(Blackhole bh) {
+        for (int i = 0; i < NUM_SAMPLES; i++) {
+            bh.consume(random.nextGaussian());
+        }
+    }
+
+    // Benchmarks methods below.
+
+    /**
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runJDKRandomGaussianSampler(Blackhole bh) {
+        runSample(bh);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/SamplersPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/SamplersPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/SamplersPerformance.java
new file mode 100644
index 0000000..963d8bd
--- /dev/null
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/SamplersPerformance.java
@@ -0,0 +1,264 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.rng.examples.jmh.distribution;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Param;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.infra.Blackhole;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.simple.RandomSource;
+import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
+import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
+import org.apache.commons.rng.sampling.distribution.BoxMullerNormalizedGaussianSampler;
+import org.apache.commons.rng.sampling.distribution.MarsagliaNormalizedGaussianSampler;
+import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler;
+import org.apache.commons.rng.sampling.distribution.AhrensDieterExponentialSampler;
+import org.apache.commons.rng.sampling.distribution.AhrensDieterMarsagliaTsangGammaSampler;
+import org.apache.commons.rng.sampling.distribution.LogNormalSampler;
+import org.apache.commons.rng.sampling.distribution.ChengBetaSampler;
+import org.apache.commons.rng.sampling.distribution.ContinuousUniformSampler;
+import org.apache.commons.rng.sampling.distribution.DiscreteUniformSampler;
+import org.apache.commons.rng.sampling.distribution.RejectionInversionZipfSampler;
+import org.apache.commons.rng.sampling.distribution.PoissonSampler;
+
+/**
+ * Executes benchmark to compare the speed of generation of random numbers
+ * from the various source providers.
+ */
+@BenchmarkMode(Mode.AverageTime)
+@OutputTimeUnit(TimeUnit.MICROSECONDS)
+@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
+@State(Scope.Benchmark)
+@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
+public class SamplersPerformance {
+    /** Number of samples per run. */
+    private static final int NUM_SAMPLES = 10000000;
+
+    /**
+     * The benchmark state (retrieve the various "RandomSource"s).
+     */
+    @State(Scope.Benchmark)
+    public static class Sources {
+        /**
+         * RNG providers.
+         */
+        @Param({"JDK",
+                "WELL_512_A",
+                "WELL_1024_A",
+                "WELL_19937_A",
+                "WELL_19937_C",
+                "WELL_44497_A",
+                "WELL_44497_B",
+                "MT",
+                "ISAAC",
+                "SPLIT_MIX_64",
+                "MWC_256",
+                "KISS",
+                "XOR_SHIFT_1024_S",
+                "TWO_CMRES",
+                "MT_64" })
+        private String randomSourceName;
+
+        /** RNG. */
+        private UniformRandomProvider generator;
+
+        /**
+         * @return the RNG.
+         */
+        public UniformRandomProvider getGenerator() {
+            return generator;
+        }
+
+        /** Intantiates generator. */
+        @Setup
+        public void setup() {
+            final RandomSource randomSource = RandomSource.valueOf(randomSourceName);
+            generator = RandomSource.create(randomSource);
+        }
+    }
+
+    /**
+     * Exercises a continuous sampler.
+     *
+     * @param sampler Sampler.
+     * @param bh Data sink.
+     */
+    private void runSample(ContinuousSampler sampler,
+                           Blackhole bh) {
+        for (int i = 0; i < NUM_SAMPLES; i++) {
+            bh.consume(sampler.sample());
+        }
+    }
+
+    /**
+     * Exercises a discrete sampler.
+     *
+     * @param sampler Sampler.
+     * @param bh Data sink.
+     */
+    private void runSample(DiscreteSampler sampler,
+                           Blackhole bh) {
+        for (int i = 0; i < NUM_SAMPLES; i++) {
+            bh.consume(sampler.sample());
+        }
+    }
+
+    // Benchmarks methods below.
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runBoxMullerNormalizedGaussianSampler(Sources sources,
+                                                      Blackhole bh) {
+        runSample(new BoxMullerNormalizedGaussianSampler(sources.getGenerator()), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runMarsagliaNormalizedGaussianSampler(Sources sources,
+                                                      Blackhole bh) {
+        runSample(new MarsagliaNormalizedGaussianSampler(sources.getGenerator()), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runZigguratNormalizedGaussianSampler(Sources sources,
+                                                     Blackhole bh) {
+        runSample(new ZigguratNormalizedGaussianSampler(sources.getGenerator()), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runAhrensDieterExponentialSampler(Sources sources,
+                                                  Blackhole bh) {
+        runSample(new AhrensDieterExponentialSampler(sources.getGenerator(), 4.56), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runAhrensDieterMarsagliaTsangGammaSampler(Sources sources,
+                                                          Blackhole bh) {
+        runSample(new AhrensDieterMarsagliaTsangGammaSampler(sources.getGenerator(), 9.8, 0.76), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runBoxMullerLogNormalSampler(Sources sources,
+                                             Blackhole bh) {
+        runSample(new LogNormalSampler(new BoxMullerNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runMarsagliaLogNormalSampler(Sources sources,
+                                             Blackhole bh) {
+        runSample(new LogNormalSampler(new MarsagliaNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runZigguratLogNormalSampler(Sources sources,
+                                            Blackhole bh) {
+        runSample(new LogNormalSampler(new ZigguratNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runChengBetaSampler(Sources sources,
+                                    Blackhole bh) {
+        runSample(new ChengBetaSampler(sources.getGenerator(), 0.45, 6.7), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runContinuousUniformSampler(Sources sources,
+                                            Blackhole bh) {
+        runSample(new ContinuousUniformSampler(sources.getGenerator(), 123.4, 5678.9), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runDiscreteUniformSampler(Sources sources,
+                                          Blackhole bh) {
+        runSample(new DiscreteUniformSampler(sources.getGenerator(), -98, 76), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runRejectionInversionZipfSampler(Sources sources,
+                                                 Blackhole bh) {
+        runSample(new RejectionInversionZipfSampler(sources.getGenerator(), 43, 2.1), bh);
+    }
+
+    /**
+     * @param sources Source of randomness.
+     * @param bh Data sink.
+     */
+    @Benchmark
+    public void runPoissonSampler(Sources sources,
+                                  Blackhole bh) {
+        runSample(new PoissonSampler(sources.getGenerator(), 8.9), bh);
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/package-info.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/package-info.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/package-info.java
new file mode 100644
index 0000000..517063d
--- /dev/null
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/distribution/package-info.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Benchmarks for samplers.
+ */
+
+package org.apache.commons.rng.examples.jmh.distribution;

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/package-info.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/package-info.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/package-info.java
new file mode 100644
index 0000000..f6a9ab7
--- /dev/null
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/package-info.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <h3>Performance benchmarks</h3>
+ *
+ * <p>
+ * This package contains code to perform a
+ * <a href="http://openjdk.java.net/projects/code-tools/jmh">JMH</a> run.
+ * </p>
+ */
+
+package org.apache.commons.rng.examples.jmh;

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/GenerationPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/GenerationPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/GenerationPerformance.java
deleted file mode 100644
index c22cf7c..0000000
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/GenerationPerformance.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.rng.examples.jmh;
-
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Param;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.infra.Blackhole;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
-
-/**
- * Executes benchmark to compare the speed of generation of random numbers
- * from the various source providers.
- */
-@BenchmarkMode(Mode.AverageTime)
-@OutputTimeUnit(TimeUnit.MICROSECONDS)
-@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@State(Scope.Benchmark)
-@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
-public class GenerationPerformance {
-    /**
-     * The benchmark state (retrieve the various "RandomSource"s).
-     */
-    @State(Scope.Benchmark)
-    public static class Sources {
-        /**
-         * RNG providers.
-         */
-        @Param({"JDK",
-                "WELL_512_A",
-                "WELL_1024_A",
-                "WELL_19937_A",
-                "WELL_19937_C",
-                "WELL_44497_A",
-                "WELL_44497_B",
-                "MT",
-                "ISAAC",
-                "SPLIT_MIX_64",
-                "MWC_256",
-                "KISS",
-                "XOR_SHIFT_1024_S",
-                "TWO_CMRES",
-                "MT_64" })
-        private String randomSourceName;
-
-        /** RNG. */
-        private UniformRandomProvider provider;
-
-        /**
-         * @return the RNG.
-         */
-        public UniformRandomProvider getGenerator() {
-            return provider;
-        }
-
-        /** Intantiates generator. */
-        @Setup
-        public void setup() {
-            final RandomSource randomSource = RandomSource.valueOf(randomSourceName);
-            provider = RandomSource.create(randomSource);
-        }
-    }
-
-    /**
-     * Number of random values to generate.
-     */
-    @Param({"1", "100", "10000", "1000000"})
-    private int numValues;
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextBoolean(Sources sources,
-                            Blackhole bh) {
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextBoolean());
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextInt(Sources sources,
-                        Blackhole bh) {
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextInt());
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextIntN(Sources sources,
-                         Blackhole bh) {
-        final int n = 10;
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextInt(n));
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextLong(Sources sources,
-                         Blackhole bh) {
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextLong());
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextLongN(Sources sources,
-                          Blackhole bh) {
-        final long n = 2L * Integer.MAX_VALUE;
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextLong(n));
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextFloat(Sources sources,
-                          Blackhole bh) {
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextFloat());
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextDouble(Sources sources,
-                           Blackhole bh) {
-        for (int i = 0; i < numValues; i++) {
-            bh.consume(sources.getGenerator().nextDouble());
-        }
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void nextBytes(Sources sources,
-                          Blackhole bh) {
-        final byte[] result = new byte[numValues];
-        sources.getGenerator().nextBytes(result);
-        bh.consume(result);
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/NextGaussianPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/NextGaussianPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/NextGaussianPerformance.java
deleted file mode 100644
index 2b65432..0000000
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/NextGaussianPerformance.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.rng.examples.jmh.distribution;
-
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.infra.Blackhole;
-import java.util.concurrent.TimeUnit;
-import java.util.Random;
-
-/**
- * Benchmark for {@link Random#nextGaussian()} in order to compare
- * the speed of generation of normally-distributed random numbers.
- */
-@BenchmarkMode(Mode.AverageTime)
-@OutputTimeUnit(TimeUnit.MICROSECONDS)
-@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@State(Scope.Benchmark)
-@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
-public class NextGaussianPerformance {
-    /** Number of samples per run. */
-    private static final int NUM_SAMPLES = 10000000;
-    /** JDK's generator. */
-    private final Random random = new Random();
-    /**
-     * Exercises the JDK's Gaussian sampler.
-     *
-     * @param bh Data sink.
-     */
-    private void runSample(Blackhole bh) {
-        for (int i = 0; i < NUM_SAMPLES; i++) {
-            bh.consume(random.nextGaussian());
-        }
-    }
-
-    // Benchmarks methods below.
-
-    /**
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runJDKRandomGaussianSampler(Blackhole bh) {
-        runSample(bh);
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/SamplersPerformance.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/SamplersPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/SamplersPerformance.java
deleted file mode 100644
index 963d8bd..0000000
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/SamplersPerformance.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.rng.examples.jmh.distribution;
-
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.BenchmarkMode;
-import org.openjdk.jmh.annotations.Mode;
-import org.openjdk.jmh.annotations.Warmup;
-import org.openjdk.jmh.annotations.Measurement;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Param;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.OutputTimeUnit;
-import org.openjdk.jmh.infra.Blackhole;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.simple.RandomSource;
-import org.apache.commons.rng.sampling.distribution.ContinuousSampler;
-import org.apache.commons.rng.sampling.distribution.DiscreteSampler;
-import org.apache.commons.rng.sampling.distribution.BoxMullerNormalizedGaussianSampler;
-import org.apache.commons.rng.sampling.distribution.MarsagliaNormalizedGaussianSampler;
-import org.apache.commons.rng.sampling.distribution.ZigguratNormalizedGaussianSampler;
-import org.apache.commons.rng.sampling.distribution.AhrensDieterExponentialSampler;
-import org.apache.commons.rng.sampling.distribution.AhrensDieterMarsagliaTsangGammaSampler;
-import org.apache.commons.rng.sampling.distribution.LogNormalSampler;
-import org.apache.commons.rng.sampling.distribution.ChengBetaSampler;
-import org.apache.commons.rng.sampling.distribution.ContinuousUniformSampler;
-import org.apache.commons.rng.sampling.distribution.DiscreteUniformSampler;
-import org.apache.commons.rng.sampling.distribution.RejectionInversionZipfSampler;
-import org.apache.commons.rng.sampling.distribution.PoissonSampler;
-
-/**
- * Executes benchmark to compare the speed of generation of random numbers
- * from the various source providers.
- */
-@BenchmarkMode(Mode.AverageTime)
-@OutputTimeUnit(TimeUnit.MICROSECONDS)
-@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
-@State(Scope.Benchmark)
-@Fork(value = 1, jvmArgs = {"-server", "-Xms128M", "-Xmx128M"})
-public class SamplersPerformance {
-    /** Number of samples per run. */
-    private static final int NUM_SAMPLES = 10000000;
-
-    /**
-     * The benchmark state (retrieve the various "RandomSource"s).
-     */
-    @State(Scope.Benchmark)
-    public static class Sources {
-        /**
-         * RNG providers.
-         */
-        @Param({"JDK",
-                "WELL_512_A",
-                "WELL_1024_A",
-                "WELL_19937_A",
-                "WELL_19937_C",
-                "WELL_44497_A",
-                "WELL_44497_B",
-                "MT",
-                "ISAAC",
-                "SPLIT_MIX_64",
-                "MWC_256",
-                "KISS",
-                "XOR_SHIFT_1024_S",
-                "TWO_CMRES",
-                "MT_64" })
-        private String randomSourceName;
-
-        /** RNG. */
-        private UniformRandomProvider generator;
-
-        /**
-         * @return the RNG.
-         */
-        public UniformRandomProvider getGenerator() {
-            return generator;
-        }
-
-        /** Intantiates generator. */
-        @Setup
-        public void setup() {
-            final RandomSource randomSource = RandomSource.valueOf(randomSourceName);
-            generator = RandomSource.create(randomSource);
-        }
-    }
-
-    /**
-     * Exercises a continuous sampler.
-     *
-     * @param sampler Sampler.
-     * @param bh Data sink.
-     */
-    private void runSample(ContinuousSampler sampler,
-                           Blackhole bh) {
-        for (int i = 0; i < NUM_SAMPLES; i++) {
-            bh.consume(sampler.sample());
-        }
-    }
-
-    /**
-     * Exercises a discrete sampler.
-     *
-     * @param sampler Sampler.
-     * @param bh Data sink.
-     */
-    private void runSample(DiscreteSampler sampler,
-                           Blackhole bh) {
-        for (int i = 0; i < NUM_SAMPLES; i++) {
-            bh.consume(sampler.sample());
-        }
-    }
-
-    // Benchmarks methods below.
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runBoxMullerNormalizedGaussianSampler(Sources sources,
-                                                      Blackhole bh) {
-        runSample(new BoxMullerNormalizedGaussianSampler(sources.getGenerator()), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runMarsagliaNormalizedGaussianSampler(Sources sources,
-                                                      Blackhole bh) {
-        runSample(new MarsagliaNormalizedGaussianSampler(sources.getGenerator()), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runZigguratNormalizedGaussianSampler(Sources sources,
-                                                     Blackhole bh) {
-        runSample(new ZigguratNormalizedGaussianSampler(sources.getGenerator()), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runAhrensDieterExponentialSampler(Sources sources,
-                                                  Blackhole bh) {
-        runSample(new AhrensDieterExponentialSampler(sources.getGenerator(), 4.56), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runAhrensDieterMarsagliaTsangGammaSampler(Sources sources,
-                                                          Blackhole bh) {
-        runSample(new AhrensDieterMarsagliaTsangGammaSampler(sources.getGenerator(), 9.8, 0.76), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runBoxMullerLogNormalSampler(Sources sources,
-                                             Blackhole bh) {
-        runSample(new LogNormalSampler(new BoxMullerNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runMarsagliaLogNormalSampler(Sources sources,
-                                             Blackhole bh) {
-        runSample(new LogNormalSampler(new MarsagliaNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runZigguratLogNormalSampler(Sources sources,
-                                            Blackhole bh) {
-        runSample(new LogNormalSampler(new ZigguratNormalizedGaussianSampler(sources.getGenerator()), 12.3, 4.6), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runChengBetaSampler(Sources sources,
-                                    Blackhole bh) {
-        runSample(new ChengBetaSampler(sources.getGenerator(), 0.45, 6.7), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runContinuousUniformSampler(Sources sources,
-                                            Blackhole bh) {
-        runSample(new ContinuousUniformSampler(sources.getGenerator(), 123.4, 5678.9), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runDiscreteUniformSampler(Sources sources,
-                                          Blackhole bh) {
-        runSample(new DiscreteUniformSampler(sources.getGenerator(), -98, 76), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runRejectionInversionZipfSampler(Sources sources,
-                                                 Blackhole bh) {
-        runSample(new RejectionInversionZipfSampler(sources.getGenerator(), 43, 2.1), bh);
-    }
-
-    /**
-     * @param sources Source of randomness.
-     * @param bh Data sink.
-     */
-    @Benchmark
-    public void runPoissonSampler(Sources sources,
-                                  Blackhole bh) {
-        runSample(new PoissonSampler(sources.getGenerator(), 8.9), bh);
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/package-info.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/package-info.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/package-info.java
deleted file mode 100644
index 517063d..0000000
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/distribution/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Benchmarks for samplers.
- */
-
-package org.apache.commons.rng.examples.jmh.distribution;

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/20f33fb6/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/package-info.java
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/package-info.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/package-info.java
deleted file mode 100644
index f6a9ab7..0000000
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/jmh/package-info.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <h3>Performance benchmarks</h3>
- *
- * <p>
- * This package contains code to perform a
- * <a href="http://openjdk.java.net/projects/code-tools/jmh">JMH</a> run.
- * </p>
- */
-
-package org.apache.commons.rng.examples.jmh;


[4/5] commons-rng git commit: Upgrade FindBugs.

Posted by er...@apache.org.
Upgrade FindBugs.

Unfortunately, Java 9 "module-info" file are not supported (and never will
as "FindBugs" has been discontinued).


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

Branch: refs/heads/master
Commit: 8d8638bf315dbe9abdf019d0344e9554dd186f1a
Parents: 22ca66d
Author: Gilles <er...@apache.org>
Authored: Wed Feb 14 19:07:25 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 14 19:07:25 2018 +0100

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/8d8638bf/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f00e64a..8082c64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,7 +100,7 @@
     <maven.compiler.source>1.6</maven.compiler.source>
     <maven.compiler.target>1.6</maven.compiler.target>
     <rng.pmd.version>3.5</rng.pmd.version>
-    <rng.findbugs.version>3.0.2</rng.findbugs.version>
+    <rng.findbugs.version>3.0.5</rng.findbugs.version>
     <rng.checkstyle.version>3.0.0</rng.checkstyle.version>
     <rng.clirr.version>2.8</rng.clirr.version>
     <rng.mathjax.version>2.7.2</rng.mathjax.version>


[3/5] commons-rng git commit: RNG-40; Warns about not using internal codes.

Posted by er...@apache.org.
RNG-40; Warns about not using internal codes.


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

Branch: refs/heads/master
Commit: 22ca66d5b0cb54e587de2dd8456e1ef8f87dbd44
Parents: d90f97d
Author: Gilles <er...@apache.org>
Authored: Wed Feb 14 17:38:54 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 14 17:38:54 2018 +0100

----------------------------------------------------------------------
 commons-rng-core/pom.xml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/22ca66d5/commons-rng-core/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-core/pom.xml b/commons-rng-core/pom.xml
index d063e1d..19d12f5 100644
--- a/commons-rng-core/pom.xml
+++ b/commons-rng-core/pom.xml
@@ -31,7 +31,11 @@
   <version>1.1-SNAPSHOT</version>
   <name>Apache Commons RNG Core</name>
 
-  <description>Pure Java implementations of random numbers generator algorithms.</description>
+  <description>Pure Java implementations of random numbers generator algorithms.
+  Code in this module should not be used directly by applications; please use
+  the client interface defined in module "commons-rng-client-api" and the factory
+  methods defined in module "commons-rng-simple". In a future release, modularization
+  may be enforced through JPMS access restrictions.</description>
 
   <properties>
     <!-- OSGi -->


[2/5] commons-rng git commit: Name of example modules.

Posted by er...@apache.org.
Name of example modules.


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

Branch: refs/heads/master
Commit: d90f97de87b380f7b3d45d409f6ccf4eced09e32
Parents: 20f33fb
Author: Gilles <er...@apache.org>
Authored: Wed Feb 14 17:32:02 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 14 17:32:02 2018 +0100

----------------------------------------------------------------------
 commons-rng-examples/examples-jmh/pom.xml        | 2 +-
 commons-rng-examples/examples-jpms/pom.xml       | 2 +-
 commons-rng-examples/examples-quadrature/pom.xml | 2 +-
 commons-rng-examples/examples-sampling/pom.xml   | 2 +-
 commons-rng-examples/examples-stress/pom.xml     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d90f97de/commons-rng-examples/examples-jmh/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jmh/pom.xml b/commons-rng-examples/examples-jmh/pom.xml
index 7022e5e..bf03851 100644
--- a/commons-rng-examples/examples-jmh/pom.xml
+++ b/commons-rng-examples/examples-jmh/pom.xml
@@ -29,7 +29,7 @@
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-rng-examples-jmh</artifactId>
   <version>1.1-SNAPSHOT</version>
-  <name>Apache Commons RNG JMH Benchmark</name>
+  <name>JMH Benchmark</name>
 
   <description>Code for running JMH benchmarks that assess the performance of the generators.
   Code in this module is not part of the public API.</description>

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d90f97de/commons-rng-examples/examples-jpms/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-jpms/pom.xml b/commons-rng-examples/examples-jpms/pom.xml
index 6f49689..91e307c 100644
--- a/commons-rng-examples/examples-jpms/pom.xml
+++ b/commons-rng-examples/examples-jpms/pom.xml
@@ -30,7 +30,7 @@
   <artifactId>commons-rng-examples-jpms</artifactId>
   <version>1.1-SNAPSHOT</version>
   <packaging>pom</packaging>
-  <name>Apache Commons RNG JPMS Integration test</name>
+  <name>JPMS Integration test</name>
 
   <description>Testing JPMS. Code in this module is not part of the public API.</description>
 

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d90f97de/commons-rng-examples/examples-quadrature/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-quadrature/pom.xml b/commons-rng-examples/examples-quadrature/pom.xml
index 3e916ab..ad40f0a 100644
--- a/commons-rng-examples/examples-quadrature/pom.xml
+++ b/commons-rng-examples/examples-quadrature/pom.xml
@@ -29,7 +29,7 @@
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-rng-examples-quadrature</artifactId>
   <version>1.1-SNAPSHOT</version>
-  <name>Apache Commons RNG Quadrature Test Example</name>
+  <name>Quadrature example</name>
 
   <description>Application for calling external tools that perform stringent uniformity tests.
   Code in this module is not part of the public API.</description>

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d90f97de/commons-rng-examples/examples-sampling/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-sampling/pom.xml b/commons-rng-examples/examples-sampling/pom.xml
index 490211d..af51710 100644
--- a/commons-rng-examples/examples-sampling/pom.xml
+++ b/commons-rng-examples/examples-sampling/pom.xml
@@ -29,7 +29,7 @@
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-rng-examples-sampling</artifactId>
   <version>1.1-SNAPSHOT</version>
-  <name>Apache Commons RNG Sampling Test Example</name>
+  <name>Sampling example</name>
 
   <description>Application for calling external tools that perform stringent uniformity tests.
   Code in this module is not part of the public API.</description>

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/d90f97de/commons-rng-examples/examples-stress/pom.xml
----------------------------------------------------------------------
diff --git a/commons-rng-examples/examples-stress/pom.xml b/commons-rng-examples/examples-stress/pom.xml
index 9f2c9c9..25d3f07 100644
--- a/commons-rng-examples/examples-stress/pom.xml
+++ b/commons-rng-examples/examples-stress/pom.xml
@@ -29,7 +29,7 @@
   <groupId>org.apache.commons</groupId>
   <artifactId>commons-rng-examples-stress</artifactId>
   <version>1.1-SNAPSHOT</version>
-  <name>Apache Commons RNG Stress Test Example</name>
+  <name>Stress test example</name>
 
   <description>Application for calling external tools that perform stringent uniformity tests.
   Code in this module is not part of the public API.</description>


[5/5] commons-rng git commit: Upgrade PMD.

Posted by er...@apache.org.
Upgrade PMD.


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

Branch: refs/heads/master
Commit: 64439c25a6aa5e285a6701d9d0ef8f8ba23d5529
Parents: 8d8638b
Author: Gilles <er...@apache.org>
Authored: Wed Feb 14 22:41:29 2018 +0100
Committer: Gilles <er...@apache.org>
Committed: Wed Feb 14 22:41:29 2018 +0100

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/64439c25/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8082c64..840c6bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,7 +99,7 @@
     <commons.encoding>UTF-8</commons.encoding>
     <maven.compiler.source>1.6</maven.compiler.source>
     <maven.compiler.target>1.6</maven.compiler.target>
-    <rng.pmd.version>3.5</rng.pmd.version>
+    <rng.pmd.version>3.9.0</rng.pmd.version>
     <rng.findbugs.version>3.0.5</rng.findbugs.version>
     <rng.checkstyle.version>3.0.0</rng.checkstyle.version>
     <rng.clirr.version>2.8</rng.clirr.version>