commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [09/50] commons-rng git commit: Rename: "InverseMethod" -> "InverseTransform".
Date Mon, 21 Nov 2016 17:03:59 GMT
Rename: "InverseMethod" -> "InverseTransform".


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

Branch: refs/heads/master
Commit: bfc833508f4183a00e31821daa7b14b1c5f32518
Parents: 438b67b
Author: Gilles <erans@apache.org>
Authored: Sat Nov 12 18:34:24 2016 +0100
Committer: Gilles <erans@apache.org>
Committed: Sat Nov 12 18:34:24 2016 +0100

----------------------------------------------------------------------
 .../InverseMethodContinuousSampler.java         | 83 --------------------
 .../InverseMethodDiscreteSampler.java           | 83 --------------------
 .../InverseMethodParetoSampler.java             | 55 -------------
 .../InverseTransformContinuousSampler.java      | 83 ++++++++++++++++++++
 .../InverseTransformDiscreteSampler.java        | 83 ++++++++++++++++++++
 .../InverseTransformParetoSampler.java          | 55 +++++++++++++
 .../rng/sampling/distribution/package-info.java |  4 +-
 .../distribution/ContinuousSamplerTestData.java |  2 +-
 .../distribution/ContinuousSamplersList.java    | 16 ++--
 .../distribution/DiscreteSamplerTestData.java   |  2 +-
 .../distribution/DiscreteSamplersList.java      |  2 +-
 11 files changed, 234 insertions(+), 234 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodContinuousSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodContinuousSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodContinuousSampler.java
deleted file mode 100644
index da33d5b..0000000
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodContinuousSampler.java
+++ /dev/null
@@ -1,83 +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.sampling.distribution;
-
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.sampling.AbstractContinuousSampler;
-
-/**
- * Distribution sampler that uses the
- * <a href="https://en.wikipedia.org/wiki/Inverse_transform_sampling">
- * inversion method</a>.
- *
- * <p>
- * It can be used to sample any distribution that provides access to its
- * <em>inverse cumulative probabilty function</em>.
- * </p>
- *
- * <p>Example:</p>
- * <pre><source>
- * import org.apache.commons.math3.distribution.RealDistribution;
- * import org.apache.commons.math3.distribution.ChiSquaredDistribution;
- *
- * import org.apache.commons.rng.simple.RandomSource;
- * import org.apache.commons.rng.sampling.ContinuousSampler;
- * import org.apache.commons.rng.sampling.distribution.InverseMethodContinuousSampler;
- * import org.apache.commons.rng.sampling.distribution.ContinuousInverseCumulativeProbabilityFunction;
- *
- * // Distribution to sample.
- * final RealDistribution dist = new ChiSquaredDistribution(9);
- * // Create the sampler.
- * final ContinuousSampler chiSquareSampler =
- *     new InverseMethodContinuousSampler(RandomSource.create(RandomSource.MT),
- *                                        new ContinuousInverseCumulativeProbabilityFunction()
{
- *                                            @Override
- *                                            public double inverseCumulativeProbability(double
p) {
- *                                                return dist.inverseCumulativeProbability(p);
- *                                            }
- *                                        });
- *
- * // Generate random deviate.
- * double random = chiSquareSampler.sample();
- * </source></pre>
- */
-public class InverseMethodContinuousSampler extends AbstractContinuousSampler {
-    /** Inverse cumulative probability function. */
-    private final ContinuousInverseCumulativeProbabilityFunction function;
-
-    /**
-     * @param rng Generator of uniformly distributed random numbers.
-     * @param function Inverse cumulative probability function.
-     */
-    public InverseMethodContinuousSampler(UniformRandomProvider rng,
-                                          ContinuousInverseCumulativeProbabilityFunction
function) {
-        super(rng);
-        this.function = function;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public double sample() {
-        return function.inverseCumulativeProbability(nextUniform());
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        return "[Inverse method " + super.toString() + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodDiscreteSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodDiscreteSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodDiscreteSampler.java
deleted file mode 100644
index 8856530..0000000
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodDiscreteSampler.java
+++ /dev/null
@@ -1,83 +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.sampling.distribution;
-
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.sampling.AbstractDiscreteSampler;
-
-/**
- * Distribution sampler that uses the
- * <a href="https://en.wikipedia.org/wiki/Inverse_transform_sampling">
- * inversion method</a>.
- *
- * <p>
- * It can be used to sample any distribution that provides access to its
- * <em>inverse cumulative probabilty function</em>.
- * </p>
- *
- * <p>Example:</p>
- * <pre><source>
- * import org.apache.commons.math3.distribution.IntegerDistribution;
- * import org.apache.commons.math3.distribution.BinomialDistribution;
- *
- * import org.apache.commons.rng.simple.RandomSource;
- * import org.apache.commons.rng.sampling.DiscreteSampler;
- * import org.apache.commons.rng.sampling.distribution.InverseMethodDiscreteSampler;
- * import org.apache.commons.rng.sampling.distribution.DiscreteInverseCumulativeProbabilityFunction;
- *
- * // Distribution to sample.
- * final IntegerDistribution dist = new BinomialDistribution(11, 0.56);
- * // Create the sampler.
- * final DiscreteSampler binomialSampler =
- *     new InverseMethodDiscreteSampler(RandomSource.create(RandomSource.MT),
- *                                      new DiscreteInverseCumulativeProbabilityFunction()
{
- *                                          @Override
- *                                          public int inverseCumulativeProbability(double
p) {
- *                                              return dist.inverseCumulativeProbability(p);
- *                                          }
- *                                      });
- *
- * // Generate random deviate.
- * int random = binomialSampler.sample();
- * </source></pre>
- */
-public class InverseMethodDiscreteSampler extends AbstractDiscreteSampler {
-    /** Inverse cumulative probability function. */
-    private final DiscreteInverseCumulativeProbabilityFunction function;
-
-    /**
-     * @param rng Generator of uniformly distributed random numbers.
-     * @param function Inverse cumulative probability function.
-     */
-    public InverseMethodDiscreteSampler(UniformRandomProvider rng,
-                                        DiscreteInverseCumulativeProbabilityFunction function)
{
-        super(rng);
-        this.function = function;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public int sample() {
-        return function.inverseCumulativeProbability(nextUniform());
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        return "[Inverse method " + super.toString() + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodParetoSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodParetoSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodParetoSampler.java
deleted file mode 100644
index 91a8bf9..0000000
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseMethodParetoSampler.java
+++ /dev/null
@@ -1,55 +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.sampling.distribution;
-
-import org.apache.commons.rng.UniformRandomProvider;
-import org.apache.commons.rng.sampling.AbstractContinuousSampler;
-
-/**
- * Sampling from a <a href="https://en.wikipedia.org/wiki/Pareto_distribution">Pareto
distribution</a>.
- */
-public class InverseMethodParetoSampler extends AbstractContinuousSampler {
-    /** Scale. */
-    private final double scale;
-    /** Shape. */
-    private final double shape;
-
-    /**
-     * @param rng Generator of uniformly distributed random numbers.
-     * @param scale Scale of the distribution.
-     * @param shape Shape of the distribution.
-     */
-    public InverseMethodParetoSampler(UniformRandomProvider rng,
-                                      double scale,
-                                      double shape) {
-        super(rng);
-        this.scale = scale;
-        this.shape = shape;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public double sample() {
-        return scale / Math.pow(nextUniform(), 1 / shape);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String toString() {
-        return "[Inverse method for Pareto distribution " + super.toString() + "]";
-    }
-}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
new file mode 100644
index 0000000..92ef64d
--- /dev/null
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformContinuousSampler.java
@@ -0,0 +1,83 @@
+/*
+ * 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.sampling.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.AbstractContinuousSampler;
+
+/**
+ * Distribution sampler that uses the
+ * <a href="https://en.wikipedia.org/wiki/Inverse_transform_sampling">
+ * inversion method</a>.
+ *
+ * <p>
+ * It can be used to sample any distribution that provides access to its
+ * <em>inverse cumulative probabilty function</em>.
+ * </p>
+ *
+ * <p>Example:</p>
+ * <pre><source>
+ * import org.apache.commons.math3.distribution.RealDistribution;
+ * import org.apache.commons.math3.distribution.ChiSquaredDistribution;
+ *
+ * import org.apache.commons.rng.simple.RandomSource;
+ * import org.apache.commons.rng.sampling.ContinuousSampler;
+ * import org.apache.commons.rng.sampling.distribution.InverseTransformContinuousSampler;
+ * import org.apache.commons.rng.sampling.distribution.ContinuousInverseCumulativeProbabilityFunction;
+ *
+ * // Distribution to sample.
+ * final RealDistribution dist = new ChiSquaredDistribution(9);
+ * // Create the sampler.
+ * final ContinuousSampler chiSquareSampler =
+ *     new InverseTransformContinuousSampler(RandomSource.create(RandomSource.MT),
+ *                                        new ContinuousInverseCumulativeProbabilityFunction()
{
+ *                                            @Override
+ *                                            public double inverseCumulativeProbability(double
p) {
+ *                                                return dist.inverseCumulativeProbability(p);
+ *                                            }
+ *                                        });
+ *
+ * // Generate random deviate.
+ * double random = chiSquareSampler.sample();
+ * </source></pre>
+ */
+public class InverseTransformContinuousSampler extends AbstractContinuousSampler {
+    /** Inverse cumulative probability function. */
+    private final ContinuousInverseCumulativeProbabilityFunction function;
+
+    /**
+     * @param rng Generator of uniformly distributed random numbers.
+     * @param function Inverse cumulative probability function.
+     */
+    public InverseTransformContinuousSampler(UniformRandomProvider rng,
+                                          ContinuousInverseCumulativeProbabilityFunction
function) {
+        super(rng);
+        this.function = function;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double sample() {
+        return function.inverseCumulativeProbability(nextUniform());
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        return "[Inverse method " + super.toString() + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
new file mode 100644
index 0000000..c81b519
--- /dev/null
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformDiscreteSampler.java
@@ -0,0 +1,83 @@
+/*
+ * 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.sampling.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.AbstractDiscreteSampler;
+
+/**
+ * Distribution sampler that uses the
+ * <a href="https://en.wikipedia.org/wiki/Inverse_transform_sampling">
+ * inversion method</a>.
+ *
+ * <p>
+ * It can be used to sample any distribution that provides access to its
+ * <em>inverse cumulative probabilty function</em>.
+ * </p>
+ *
+ * <p>Example:</p>
+ * <pre><source>
+ * import org.apache.commons.math3.distribution.IntegerDistribution;
+ * import org.apache.commons.math3.distribution.BinomialDistribution;
+ *
+ * import org.apache.commons.rng.simple.RandomSource;
+ * import org.apache.commons.rng.sampling.DiscreteSampler;
+ * import org.apache.commons.rng.sampling.distribution.InverseTransformDiscreteSampler;
+ * import org.apache.commons.rng.sampling.distribution.DiscreteInverseCumulativeProbabilityFunction;
+ *
+ * // Distribution to sample.
+ * final IntegerDistribution dist = new BinomialDistribution(11, 0.56);
+ * // Create the sampler.
+ * final DiscreteSampler binomialSampler =
+ *     new InverseTransformDiscreteSampler(RandomSource.create(RandomSource.MT),
+ *                                      new DiscreteInverseCumulativeProbabilityFunction()
{
+ *                                          @Override
+ *                                          public int inverseCumulativeProbability(double
p) {
+ *                                              return dist.inverseCumulativeProbability(p);
+ *                                          }
+ *                                      });
+ *
+ * // Generate random deviate.
+ * int random = binomialSampler.sample();
+ * </source></pre>
+ */
+public class InverseTransformDiscreteSampler extends AbstractDiscreteSampler {
+    /** Inverse cumulative probability function. */
+    private final DiscreteInverseCumulativeProbabilityFunction function;
+
+    /**
+     * @param rng Generator of uniformly distributed random numbers.
+     * @param function Inverse cumulative probability function.
+     */
+    public InverseTransformDiscreteSampler(UniformRandomProvider rng,
+                                        DiscreteInverseCumulativeProbabilityFunction function)
{
+        super(rng);
+        this.function = function;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int sample() {
+        return function.inverseCumulativeProbability(nextUniform());
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        return "[Inverse method " + super.toString() + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSampler.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSampler.java
new file mode 100644
index 0000000..5f18702
--- /dev/null
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/InverseTransformParetoSampler.java
@@ -0,0 +1,55 @@
+/*
+ * 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.sampling.distribution;
+
+import org.apache.commons.rng.UniformRandomProvider;
+import org.apache.commons.rng.sampling.AbstractContinuousSampler;
+
+/**
+ * Sampling from a <a href="https://en.wikipedia.org/wiki/Pareto_distribution">Pareto
distribution</a>.
+ */
+public class InverseTransformParetoSampler extends AbstractContinuousSampler {
+    /** Scale. */
+    private final double scale;
+    /** Shape. */
+    private final double shape;
+
+    /**
+     * @param rng Generator of uniformly distributed random numbers.
+     * @param scale Scale of the distribution.
+     * @param shape Shape of the distribution.
+     */
+    public InverseTransformParetoSampler(UniformRandomProvider rng,
+                                      double scale,
+                                      double shape) {
+        super(rng);
+        this.scale = scale;
+        this.shape = shape;
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public double sample() {
+        return scale / Math.pow(nextUniform(), 1 / shape);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public String toString() {
+        return "[Inverse method for Pareto distribution " + super.toString() + "]";
+    }
+}

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/package-info.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/package-info.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/package-info.java
index af157fc..1b75247 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/package-info.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/package-info.java
@@ -30,8 +30,8 @@
  * When no specific algorithm is provided, one can still sample from any
  * distribution, using the <em>inverse method</em>, as illustrated in:
  * <ul>
- *  <li>{@link org.apache.commons.rng.sampling.distribution.InverseMethodDiscreteSampler
InverseMethodDiscreteSampler}</li>
- *  <li>{@link org.apache.commons.rng.sampling.distribution.InverseMethodContinuousSampler
InverseMethodContinuousSampler}</li>
+ *  <li>{@link org.apache.commons.rng.sampling.distribution.InverseTransformDiscreteSampler
InverseTransformDiscreteSampler}</li>
+ *  <li>{@link org.apache.commons.rng.sampling.distribution.InverseTransformContinuousSampler
InverseTransformContinuousSampler}</li>
  * </ul>
  *
  * Algorithms are described in e.g. Luc Devroye (1986), <a href="http://luc.devroye.org/chapter_nine.pdf">chapter
9</a>

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
index a9754b4..a3dd651 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/ContinuousSamplerTestData.java
@@ -21,7 +21,7 @@ import java.util.Arrays;
 import org.apache.commons.rng.sampling.ContinuousSampler;
 
 /**
- * Data store for {@link InverseMethodContinuousParametricTest}.
+ * Data store for {@link ContinuousSamplerParametricTest}.
  */
 class ContinuousSamplerTestData {
     private final ContinuousSampler sampler;

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/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 b660738..7cfe38a 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
@@ -141,7 +141,7 @@ public class ContinuousSamplersList {
                 RandomSource.create(RandomSource.TWO_CMRES_SELECT, null, 9, 11));
             // Pareto.
             add(LIST, new org.apache.commons.math3.distribution.ParetoDistribution(scalePareto,
shapePareto),
-                new InverseMethodParetoSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S),
scalePareto, shapePareto));
+                new InverseTransformParetoSampler(RandomSource.create(RandomSource.XOR_SHIFT_1024_S),
scalePareto, shapePareto));
 
             // T ("inverse method").
             final double dofT = 0.76543;
@@ -190,13 +190,13 @@ public class ContinuousSamplersList {
                             final org.apache.commons.math3.distribution.RealDistribution
dist,
                             UniformRandomProvider rng) {
         final ContinuousSampler inverseMethodSampler =
-            new InverseMethodContinuousSampler(rng,
-                                               new ContinuousInverseCumulativeProbabilityFunction()
{
-                                                   @Override
-                                                   public double inverseCumulativeProbability(double
p) {
-                                                       return dist.inverseCumulativeProbability(p);
-                                                   }
-                                               });
+            new InverseTransformContinuousSampler(rng,
+                                                  new ContinuousInverseCumulativeProbabilityFunction()
{
+                                                      @Override
+                                                      public double inverseCumulativeProbability(double
p) {
+                                                          return dist.inverseCumulativeProbability(p);
+                                                      }
+                                                  });
         list.add(new ContinuousSamplerTestData[] { new ContinuousSamplerTestData(inverseMethodSampler,
                                                                                  getDeciles(dist))
});
      }

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
----------------------------------------------------------------------
diff --git a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
index fd52f29..1857afc 100644
--- a/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
+++ b/commons-rng-sampling/src/test/java/org/apache/commons/rng/sampling/distribution/DiscreteSamplerTestData.java
@@ -21,7 +21,7 @@ import java.util.Arrays;
 import org.apache.commons.rng.sampling.DiscreteSampler;
 
 /**
- * Data store for {@link InverseMethodDiscreteParametricTest}.
+ * Data store for {@link DiscreteSamplerParametricTest}.
  */
 class DiscreteSamplerTestData {
     private final DiscreteSampler sampler;

http://git-wip-us.apache.org/repos/asf/commons-rng/blob/bfc83350/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 7a7425f..10e4588 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
@@ -126,7 +126,7 @@ public class DiscreteSamplersList {
                             int[] points,
                             UniformRandomProvider rng) {
         final DiscreteSampler inverseMethodSampler =
-            new InverseMethodDiscreteSampler(rng,
+            new InverseTransformDiscreteSampler(rng,
                                              new DiscreteInverseCumulativeProbabilityFunction()
{
                                                  @Override
                                                  public int inverseCumulativeProbability(double
p) {


Mime
View raw message