You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2014/12/15 21:21:22 UTC

[math] [MATH-1154] Add clarification to ctor javadoc of all distributions to pass a null random generator in case no sampling is needed.

Repository: commons-math
Updated Branches:
  refs/heads/master 59fe593a4 -> 809f0f89c


[MATH-1154] Add clarification to ctor javadoc of all distributions to pass a null random generator in case no sampling is needed.


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

Branch: refs/heads/master
Commit: 809f0f89cb53548a7d0a9f9f52c4b36f60c7b6c0
Parents: 59fe593
Author: Thomas Neidhart <th...@gmail.com>
Authored: Mon Dec 15 21:21:09 2014 +0100
Committer: Thomas Neidhart <th...@gmail.com>
Committed: Mon Dec 15 21:21:09 2014 +0100

----------------------------------------------------------------------
 .../math3/distribution/BetaDistribution.java    | 20 +++++++++++++---
 .../distribution/BinomialDistribution.java      | 13 +++++++---
 .../math3/distribution/CauchyDistribution.java  | 16 ++++++++++++-
 .../distribution/ChiSquaredDistribution.java    |  7 ++++++
 .../distribution/EnumeratedDistribution.java    |  7 ++++++
 .../EnumeratedIntegerDistribution.java          |  8 +++++++
 .../EnumeratedRealDistribution.java             |  7 ++++++
 .../distribution/ExponentialDistribution.java   | 19 +++++++++++++--
 .../math3/distribution/FDistribution.java       | 18 ++++++++++++--
 .../math3/distribution/GammaDistribution.java   | 18 ++++++++++++--
 .../distribution/GeometricDistribution.java     |  9 ++++++-
 .../math3/distribution/GumbelDistribution.java  |  7 ++++++
 .../HypergeometricDistribution.java             |  9 ++++++-
 .../math3/distribution/LaplaceDistribution.java |  7 ++++++
 .../math3/distribution/LevyDistribution.java    | 19 +++++++++++++++
 .../distribution/LogNormalDistribution.java     | 25 ++++++++++++++++++--
 .../distribution/LogisticDistribution.java      |  7 ++++++
 .../MixtureMultivariateNormalDistribution.java  | 19 ++++++++++++++-
 .../MixtureMultivariateRealDistribution.java    | 12 ++++++++--
 .../MultivariateNormalDistribution.java         |  7 ++++++
 .../distribution/NakagamiDistribution.java      | 14 +++++++++++
 .../math3/distribution/NormalDistribution.java  | 25 ++++++++++++++++++--
 .../math3/distribution/ParetoDistribution.java  | 20 +++++++++++++---
 .../math3/distribution/PascalDistribution.java  | 11 +++++++--
 .../math3/distribution/PoissonDistribution.java | 20 +++++++++++++---
 .../math3/distribution/TDistribution.java       | 14 +++++++++++
 .../distribution/TriangularDistribution.java    |  9 ++++++-
 .../UniformIntegerDistribution.java             |  7 ++++++
 .../distribution/UniformRealDistribution.java   | 14 +++++++++++
 .../math3/distribution/WeibullDistribution.java | 20 +++++++++++++---
 .../math3/distribution/ZipfDistribution.java    |  9 ++++++-
 31 files changed, 382 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/BetaDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/BetaDistribution.java b/src/main/java/org/apache/commons/math3/distribution/BetaDistribution.java
index 6c0a117..3f62f64 100644
--- a/src/main/java/org/apache/commons/math3/distribution/BetaDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/BetaDistribution.java
@@ -18,11 +18,11 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.NumberIsTooSmallException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.special.Beta;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Beta;
+import org.apache.commons.math3.special.Gamma;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implements the Beta distribution.
@@ -51,6 +51,13 @@ public class BetaDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param alpha First shape parameter (must be positive).
      * @param beta Second shape parameter (must be positive).
@@ -61,6 +68,13 @@ public class BetaDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param alpha First shape parameter (must be positive).
      * @param beta Second shape parameter (must be positive).

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/BinomialDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/BinomialDistribution.java b/src/main/java/org/apache/commons/math3/distribution/BinomialDistribution.java
index b80c26c..f8cea26 100644
--- a/src/main/java/org/apache/commons/math3/distribution/BinomialDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/BinomialDistribution.java
@@ -16,13 +16,13 @@
  */
 package org.apache.commons.math3.distribution;
 
-import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.NotPositiveException;
+import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Beta;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Beta;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the binomial distribution.
@@ -41,6 +41,13 @@ public class BinomialDistribution extends AbstractIntegerDistribution {
     /**
      * Create a binomial distribution with the given number of trials and
      * probability of success.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param trials Number of trials.
      * @param p Probability of success.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/CauchyDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/CauchyDistribution.java b/src/main/java/org/apache/commons/math3/distribution/CauchyDistribution.java
index ae1d0a3..af3d33a 100644
--- a/src/main/java/org/apache/commons/math3/distribution/CauchyDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/CauchyDistribution.java
@@ -19,9 +19,9 @@ package org.apache.commons.math3.distribution;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the Cauchy distribution.
@@ -55,6 +55,13 @@ public class CauchyDistribution extends AbstractRealDistribution {
 
     /**
      * Creates a Cauchy distribution using the given median and scale.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param median Median for this distribution.
      * @param scale Scale parameter for this distribution.
@@ -65,6 +72,13 @@ public class CauchyDistribution extends AbstractRealDistribution {
 
     /**
      * Creates a Cauchy distribution using the given median and scale.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param median Median for this distribution.
      * @param scale Scale parameter for this distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/ChiSquaredDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/ChiSquaredDistribution.java b/src/main/java/org/apache/commons/math3/distribution/ChiSquaredDistribution.java
index 5f67014..393d352 100644
--- a/src/main/java/org/apache/commons/math3/distribution/ChiSquaredDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/ChiSquaredDistribution.java
@@ -50,6 +50,13 @@ public class ChiSquaredDistribution extends AbstractRealDistribution {
     /**
      * Create a Chi-Squared distribution with the given degrees of freedom and
      * inverse cumulative probability accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param degreesOfFreedom Degrees of freedom.
      * @param inverseCumAccuracy the maximum absolute error in inverse

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/EnumeratedDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/EnumeratedDistribution.java b/src/main/java/org/apache/commons/math3/distribution/EnumeratedDistribution.java
index e95098c..4cb23c1 100644
--- a/src/main/java/org/apache/commons/math3/distribution/EnumeratedDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/EnumeratedDistribution.java
@@ -81,6 +81,13 @@ public class EnumeratedDistribution<T> implements Serializable {
     /**
      * Create an enumerated distribution using the given probability mass function
      * enumeration.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param pmf probability mass function enumerated as a list of <T, probability>
      * pairs.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.java b/src/main/java/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.java
index 38f020f..9a07787 100644
--- a/src/main/java/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/EnumeratedIntegerDistribution.java
@@ -18,6 +18,7 @@ package org.apache.commons.math3.distribution;
 
 import java.util.ArrayList;
 import java.util.List;
+
 import org.apache.commons.math3.exception.DimensionMismatchException;
 import org.apache.commons.math3.exception.MathArithmeticException;
 import org.apache.commons.math3.exception.NotANumberException;
@@ -51,6 +52,13 @@ public class EnumeratedIntegerDistribution extends AbstractIntegerDistribution {
     /**
      * Create a discrete distribution using the given probability mass function
      * definition.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param singletons array of random variable values.
      * @param probabilities array of probabilities.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/EnumeratedRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/EnumeratedRealDistribution.java b/src/main/java/org/apache/commons/math3/distribution/EnumeratedRealDistribution.java
index 3069e59..07b96bc 100644
--- a/src/main/java/org/apache/commons/math3/distribution/EnumeratedRealDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/EnumeratedRealDistribution.java
@@ -53,6 +53,13 @@ public class EnumeratedRealDistribution extends AbstractRealDistribution {
     /**
      * Create a discrete distribution using the given probability mass function
      * enumeration.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param singletons array of random variable values.
      * @param probabilities array of probabilities.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/ExponentialDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/ExponentialDistribution.java b/src/main/java/org/apache/commons/math3/distribution/ExponentialDistribution.java
index 1c044ed..411f1a2 100644
--- a/src/main/java/org/apache/commons/math3/distribution/ExponentialDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/ExponentialDistribution.java
@@ -19,11 +19,11 @@ package org.apache.commons.math3.distribution;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math3.random.RandomGenerator;
+import org.apache.commons.math3.random.Well19937c;
 import org.apache.commons.math3.util.CombinatoricsUtils;
 import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.util.ResizableDoubleArray;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
 
 /**
  * Implementation of the exponential distribution.
@@ -91,6 +91,14 @@ public class ExponentialDistribution extends AbstractRealDistribution {
 
     /**
      * Create an exponential distribution with the given mean.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
+     *
      * @param mean mean of this distribution.
      */
     public ExponentialDistribution(double mean) {
@@ -99,6 +107,13 @@ public class ExponentialDistribution extends AbstractRealDistribution {
 
     /**
      * Create an exponential distribution with the given mean.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mean Mean of this distribution.
      * @param inverseCumAccuracy Maximum absolute error in inverse

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/FDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/FDistribution.java b/src/main/java/org/apache/commons/math3/distribution/FDistribution.java
index 2ad415e..bd98c37 100644
--- a/src/main/java/org/apache/commons/math3/distribution/FDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/FDistribution.java
@@ -19,10 +19,10 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Beta;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Beta;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the F-distribution.
@@ -51,6 +51,13 @@ public class FDistribution extends AbstractRealDistribution {
 
     /**
      * Creates an F distribution using the given degrees of freedom.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param numeratorDegreesOfFreedom Numerator degrees of freedom.
      * @param denominatorDegreesOfFreedom Denominator degrees of freedom.
@@ -68,6 +75,13 @@ public class FDistribution extends AbstractRealDistribution {
     /**
      * Creates an F distribution using the given degrees of freedom
      * and inverse cumulative probability accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param numeratorDegreesOfFreedom Numerator degrees of freedom.
      * @param denominatorDegreesOfFreedom Denominator degrees of freedom.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java b/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
index 3b8aad9..4f60fa9 100644
--- a/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/GammaDistribution.java
@@ -18,10 +18,10 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Gamma;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the Gamma distribution.
@@ -100,6 +100,13 @@ public class GammaDistribution extends AbstractRealDistribution {
     /**
      * Creates a new gamma distribution with specified values of the shape and
      * scale parameters.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param shape the shape parameter
      * @param scale the scale parameter
@@ -113,6 +120,13 @@ public class GammaDistribution extends AbstractRealDistribution {
     /**
      * Creates a new gamma distribution with specified values of the shape and
      * scale parameters.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param shape the shape parameter
      * @param scale the scale parameter

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java b/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java
index 2999d63..f82a3ec 100644
--- a/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/GeometricDistribution.java
@@ -18,9 +18,9 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the geometric distribution.
@@ -38,6 +38,13 @@ public class GeometricDistribution extends AbstractIntegerDistribution {
 
     /**
      * Create a geometric distribution with the given probability of success.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param p probability of success.
      * @throws OutOfRangeException if {@code p <= 0} or {@code p > 1}.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/GumbelDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/GumbelDistribution.java b/src/main/java/org/apache/commons/math3/distribution/GumbelDistribution.java
index f42a1e8..85dbedd 100644
--- a/src/main/java/org/apache/commons/math3/distribution/GumbelDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/GumbelDistribution.java
@@ -50,6 +50,13 @@ public class GumbelDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mu location parameter
      * @param beta scale parameter (must be positive)

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/HypergeometricDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/HypergeometricDistribution.java b/src/main/java/org/apache/commons/math3/distribution/HypergeometricDistribution.java
index c2a5ca0..7a1436a 100644
--- a/src/main/java/org/apache/commons/math3/distribution/HypergeometricDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/HypergeometricDistribution.java
@@ -21,9 +21,9 @@ import org.apache.commons.math3.exception.NotPositiveException;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.NumberIsTooLargeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the hypergeometric distribution.
@@ -48,6 +48,13 @@ public class HypergeometricDistribution extends AbstractIntegerDistribution {
     /**
      * Construct a new hypergeometric distribution with the specified population
      * size, number of successes in the population, and sample size.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param populationSize Population size.
      * @param numberOfSuccesses Number of successes in the population.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java b/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java
index 4badc05..0514bff 100644
--- a/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/LaplaceDistribution.java
@@ -42,6 +42,13 @@ public class LaplaceDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mu location parameter
      * @param beta scale parameter (must be positive)

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/LevyDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/LevyDistribution.java b/src/main/java/org/apache/commons/math3/distribution/LevyDistribution.java
index 5024b02..4580e50 100644
--- a/src/main/java/org/apache/commons/math3/distribution/LevyDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/LevyDistribution.java
@@ -18,6 +18,7 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.random.RandomGenerator;
+import org.apache.commons.math3.random.Well19937c;
 import org.apache.commons.math3.special.Erf;
 import org.apache.commons.math3.util.FastMath;
 
@@ -42,6 +43,24 @@ public class LevyDistribution extends AbstractRealDistribution {
     private final double halfC;
 
     /**
+     * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
+     *
+     * @param mu location parameter
+     * @param c scale parameter
+     * @since 3.4
+     */
+    public LevyDistribution(final double mu, final double c) {
+        this(new Well19937c(), mu, c);
+    }
+
+    /**
      * Creates a LevyDistribution.
      * @param rng random generator to be used for sampling
      * @param mu location

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/LogNormalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/LogNormalDistribution.java b/src/main/java/org/apache/commons/math3/distribution/LogNormalDistribution.java
index 0fc9ed1..b8148b0 100644
--- a/src/main/java/org/apache/commons/math3/distribution/LogNormalDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/LogNormalDistribution.java
@@ -20,10 +20,10 @@ package org.apache.commons.math3.distribution;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.NumberIsTooLargeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Erf;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Erf;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the log-normal (gaussian) distribution.
@@ -82,6 +82,13 @@ public class LogNormalDistribution extends AbstractRealDistribution {
      * logarithm of the log-normal distribution are equal to zero and one
      * respectively. In other words, the scale of the returned distribution is
      * {@code 0}, while its shape is {@code 1}.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      */
     public LogNormalDistribution() {
         this(0, 1);
@@ -89,6 +96,13 @@ public class LogNormalDistribution extends AbstractRealDistribution {
 
     /**
      * Create a log-normal distribution using the specified scale and shape.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param scale the scale parameter of this distribution
      * @param shape the shape parameter of this distribution
@@ -102,6 +116,13 @@ public class LogNormalDistribution extends AbstractRealDistribution {
     /**
      * Create a log-normal distribution using the specified scale, shape and
      * inverse cumulative distribution accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param scale the scale parameter of this distribution
      * @param shape the shape parameter of this distribution

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/LogisticDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/LogisticDistribution.java b/src/main/java/org/apache/commons/math3/distribution/LogisticDistribution.java
index 7305594..59313f5 100644
--- a/src/main/java/org/apache/commons/math3/distribution/LogisticDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/LogisticDistribution.java
@@ -44,6 +44,13 @@ public class LogisticDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mu location parameter
      * @param s scale parameter (must be positive)

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateNormalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateNormalDistribution.java b/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateNormalDistribution.java
index bc66e59..0cf88c2 100644
--- a/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateNormalDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateNormalDistribution.java
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.math3.distribution;
 
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.commons.math3.exception.DimensionMismatchException;
 import org.apache.commons.math3.exception.NotPositiveException;
@@ -33,8 +33,17 @@ import org.apache.commons.math3.util.Pair;
  */
 public class MixtureMultivariateNormalDistribution
     extends MixtureMultivariateRealDistribution<MultivariateNormalDistribution> {
+
     /**
      * Creates a multivariate normal mixture distribution.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link org.apache.commons.math3.random.Well19937c Well19937c} as random
+     * generator to be used for sampling only (see {@link #sample()} and
+     * {@link #sample(int)}). In case no sampling is needed for the created
+     * distribution, it is advised to pass {@code null} as random generator via
+     * the appropriate constructors to avoid the additional initialisation
+     * overhead.
      *
      * @param weights Weights of each component.
      * @param means Mean vector for each component.
@@ -49,6 +58,14 @@ public class MixtureMultivariateNormalDistribution
     /**
      * Creates a mixture model from a list of distributions and their
      * associated weights.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link org.apache.commons.math3.random.Well19937c Well19937c} as random
+     * generator to be used for sampling only (see {@link #sample()} and
+     * {@link #sample(int)}). In case no sampling is needed for the created
+     * distribution, it is advised to pass {@code null} as random generator via
+     * the appropriate constructors to avoid the additional initialisation
+     * overhead.
      *
      * @param components List of (weight, distribution) pairs from which to sample.
      */

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateRealDistribution.java b/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateRealDistribution.java
index e70d271..f0939f6 100644
--- a/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateRealDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/MixtureMultivariateRealDistribution.java
@@ -16,11 +16,12 @@
  */
 package org.apache.commons.math3.distribution;
 
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.commons.math3.exception.DimensionMismatchException;
-import org.apache.commons.math3.exception.NotPositiveException;
 import org.apache.commons.math3.exception.MathArithmeticException;
+import org.apache.commons.math3.exception.NotPositiveException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
@@ -44,6 +45,13 @@ public class MixtureMultivariateRealDistribution<T extends MultivariateRealDistr
     /**
      * Creates a mixture model from a list of distributions and their
      * associated weights.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param components List of (weight, distribution) pairs from which to sample.
      */

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/MultivariateNormalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/MultivariateNormalDistribution.java b/src/main/java/org/apache/commons/math3/distribution/MultivariateNormalDistribution.java
index 165bcff..7fc8b74 100644
--- a/src/main/java/org/apache/commons/math3/distribution/MultivariateNormalDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/MultivariateNormalDistribution.java
@@ -57,6 +57,13 @@ public class MultivariateNormalDistribution
      * The number of dimensions is equal to the length of the mean vector
      * and to the number of rows and columns of the covariance matrix.
      * It is frequently written as "p" in formulae.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param means Vector of means.
      * @param covariances Covariance matrix.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/NakagamiDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/NakagamiDistribution.java b/src/main/java/org/apache/commons/math3/distribution/NakagamiDistribution.java
index 60c0c33..2b1f81f 100644
--- a/src/main/java/org/apache/commons/math3/distribution/NakagamiDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/NakagamiDistribution.java
@@ -48,6 +48,13 @@ public class NakagamiDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mu shape parameter
      * @param omega scale parameter (must be positive)
@@ -60,6 +67,13 @@ public class NakagamiDistribution extends AbstractRealDistribution {
 
     /**
      * Build a new instance.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mu shape parameter
      * @param omega scale parameter (must be positive)

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/NormalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/NormalDistribution.java b/src/main/java/org/apache/commons/math3/distribution/NormalDistribution.java
index c5a5edf..0fc839f 100644
--- a/src/main/java/org/apache/commons/math3/distribution/NormalDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/NormalDistribution.java
@@ -21,10 +21,10 @@ import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.NumberIsTooLargeException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Erf;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Erf;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the normal (gaussian) distribution.
@@ -54,6 +54,13 @@ public class NormalDistribution extends AbstractRealDistribution {
     /**
      * Create a normal distribution with mean equal to zero and standard
      * deviation equal to one.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      */
     public NormalDistribution() {
         this(0, 1);
@@ -61,6 +68,13 @@ public class NormalDistribution extends AbstractRealDistribution {
 
     /**
      * Create a normal distribution using the given mean and standard deviation.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mean Mean for this distribution.
      * @param sd Standard deviation for this distribution.
@@ -74,6 +88,13 @@ public class NormalDistribution extends AbstractRealDistribution {
     /**
      * Create a normal distribution using the given mean, standard deviation and
      * inverse cumulative distribution accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param mean Mean for this distribution.
      * @param sd Standard deviation for this distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/ParetoDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/ParetoDistribution.java b/src/main/java/org/apache/commons/math3/distribution/ParetoDistribution.java
index 2ccff09..3c4d77a 100644
--- a/src/main/java/org/apache/commons/math3/distribution/ParetoDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/ParetoDistribution.java
@@ -20,9 +20,9 @@ package org.apache.commons.math3.distribution;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.NumberIsTooLargeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the Pareto distribution.
@@ -72,6 +72,13 @@ public class ParetoDistribution extends AbstractRealDistribution {
 
     /**
      * Create a Pareto distribution using the specified scale and shape.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param scale the scale parameter of this distribution
      * @param shape the shape parameter of this distribution
@@ -85,6 +92,13 @@ public class ParetoDistribution extends AbstractRealDistribution {
     /**
      * Create a Pareto distribution using the specified scale, shape and
      * inverse cumulative distribution accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param scale the scale parameter of this distribution
      * @param shape the shape parameter of this distribution
@@ -97,7 +111,7 @@ public class ParetoDistribution extends AbstractRealDistribution {
     }
 
     /**
-     * Creates a log-normal distribution.
+     * Creates a Pareto distribution.
      *
      * @param rng Random number generator.
      * @param scale Scale parameter of this distribution.
@@ -110,7 +124,7 @@ public class ParetoDistribution extends AbstractRealDistribution {
     }
 
     /**
-     * Creates a log-normal distribution.
+     * Creates a Pareto distribution.
      *
      * @param rng Random number generator.
      * @param scale Scale parameter of this distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java b/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
index aebe312..bf39933 100644
--- a/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/PascalDistribution.java
@@ -19,11 +19,11 @@ package org.apache.commons.math3.distribution;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math3.random.RandomGenerator;
+import org.apache.commons.math3.random.Well19937c;
 import org.apache.commons.math3.special.Beta;
 import org.apache.commons.math3.util.CombinatoricsUtils;
 import org.apache.commons.math3.util.FastMath;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
 
 /**
  * <p>
@@ -77,6 +77,13 @@ public class PascalDistribution extends AbstractIntegerDistribution {
     /**
      * Create a Pascal distribution with the given number of successes and
      * probability of success.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param r Number of successes.
      * @param p Probability of success.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java b/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
index 0dd9583..f748081 100644
--- a/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/PoissonDistribution.java
@@ -18,12 +18,12 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
+import org.apache.commons.math3.random.RandomGenerator;
+import org.apache.commons.math3.random.Well19937c;
 import org.apache.commons.math3.special.Gamma;
 import org.apache.commons.math3.util.CombinatoricsUtils;
-import org.apache.commons.math3.util.MathUtils;
 import org.apache.commons.math3.util.FastMath;
-import org.apache.commons.math3.random.RandomGenerator;
-import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.MathUtils;
 
 /**
  * Implementation of the Poisson distribution.
@@ -65,6 +65,13 @@ public class PoissonDistribution extends AbstractIntegerDistribution {
 
     /**
      * Creates a new Poisson distribution with specified mean.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param p the Poisson mean
      * @throws NotStrictlyPositiveException if {@code p <= 0}.
@@ -76,6 +83,13 @@ public class PoissonDistribution extends AbstractIntegerDistribution {
     /**
      * Creates a new Poisson distribution with specified mean, convergence
      * criterion and maximum number of iterations.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param p Poisson mean.
      * @param epsilon Convergence criterion for cumulative probabilities.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/TDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/TDistribution.java b/src/main/java/org/apache/commons/math3/distribution/TDistribution.java
index cfcfc8e..0c0e1cb 100644
--- a/src/main/java/org/apache/commons/math3/distribution/TDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/TDistribution.java
@@ -47,6 +47,13 @@ public class TDistribution extends AbstractRealDistribution {
 
     /**
      * Create a t distribution using the given degrees of freedom.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param degreesOfFreedom Degrees of freedom.
      * @throws NotStrictlyPositiveException if {@code degreesOfFreedom <= 0}
@@ -59,6 +66,13 @@ public class TDistribution extends AbstractRealDistribution {
     /**
      * Create a t distribution using the given degrees of freedom and the
      * specified inverse cumulative probability absolute accuracy.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param degreesOfFreedom Degrees of freedom.
      * @param inverseCumAccuracy the maximum absolute error in inverse

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java b/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java
index 1dba66c..1a81ecb 100644
--- a/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/TriangularDistribution.java
@@ -21,9 +21,9 @@ import org.apache.commons.math3.exception.NumberIsTooLargeException;
 import org.apache.commons.math3.exception.NumberIsTooSmallException;
 import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the triangular real distribution.
@@ -48,6 +48,13 @@ public class TriangularDistribution extends AbstractRealDistribution {
     /**
      * Creates a triangular real distribution using the given lower limit,
      * upper limit, and mode.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param a Lower limit of this distribution (inclusive).
      * @param b Upper limit of this distribution (inclusive).

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/UniformIntegerDistribution.java b/src/main/java/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
index cd9aca3..dd5ffa4 100644
--- a/src/main/java/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
@@ -41,6 +41,13 @@ public class UniformIntegerDistribution extends AbstractIntegerDistribution {
     /**
      * Creates a new uniform integer distribution using the given lower and
      * upper bounds (both inclusive).
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param lower Lower bound (inclusive) of this distribution.
      * @param upper Upper bound (inclusive) of this distribution.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/UniformRealDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/UniformRealDistribution.java b/src/main/java/org/apache/commons/math3/distribution/UniformRealDistribution.java
index d97c53f..10c7712 100644
--- a/src/main/java/org/apache/commons/math3/distribution/UniformRealDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/UniformRealDistribution.java
@@ -47,6 +47,13 @@ public class UniformRealDistribution extends AbstractRealDistribution {
     /**
      * Create a standard uniform real distribution with lower bound (inclusive)
      * equal to zero and upper bound (exclusive) equal to one.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      */
     public UniformRealDistribution() {
         this(0, 1);
@@ -55,6 +62,13 @@ public class UniformRealDistribution extends AbstractRealDistribution {
     /**
      * Create a uniform real distribution using the given lower and upper
      * bounds.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param lower Lower bound of this distribution (inclusive).
      * @param upper Upper bound of this distribution (exclusive).

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/WeibullDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/WeibullDistribution.java b/src/main/java/org/apache/commons/math3/distribution/WeibullDistribution.java
index 3b58f90..f1fdabd 100644
--- a/src/main/java/org/apache/commons/math3/distribution/WeibullDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/WeibullDistribution.java
@@ -17,13 +17,13 @@
 
 package org.apache.commons.math3.distribution;
 
-import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
+import org.apache.commons.math3.exception.OutOfRangeException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.special.Gamma;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.special.Gamma;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the Weibull distribution. This implementation uses the
@@ -61,6 +61,13 @@ public class WeibullDistribution extends AbstractRealDistribution {
     /**
      * Create a Weibull distribution with the given shape and scale and a
      * location equal to zero.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param alpha Shape parameter.
      * @param beta Scale parameter.
@@ -75,6 +82,13 @@ public class WeibullDistribution extends AbstractRealDistribution {
     /**
      * Create a Weibull distribution with the given shape, scale and inverse
      * cumulative probability accuracy and a location equal to zero.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param alpha Shape parameter.
      * @param beta Scale parameter.

http://git-wip-us.apache.org/repos/asf/commons-math/blob/809f0f89/src/main/java/org/apache/commons/math3/distribution/ZipfDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/distribution/ZipfDistribution.java b/src/main/java/org/apache/commons/math3/distribution/ZipfDistribution.java
index 92ceb1b..18cb2f4 100644
--- a/src/main/java/org/apache/commons/math3/distribution/ZipfDistribution.java
+++ b/src/main/java/org/apache/commons/math3/distribution/ZipfDistribution.java
@@ -19,9 +19,9 @@ package org.apache.commons.math3.distribution;
 
 import org.apache.commons.math3.exception.NotStrictlyPositiveException;
 import org.apache.commons.math3.exception.util.LocalizedFormats;
-import org.apache.commons.math3.util.FastMath;
 import org.apache.commons.math3.random.RandomGenerator;
 import org.apache.commons.math3.random.Well19937c;
+import org.apache.commons.math3.util.FastMath;
 
 /**
  * Implementation of the Zipf distribution.
@@ -47,6 +47,13 @@ public class ZipfDistribution extends AbstractIntegerDistribution {
     /**
      * Create a new Zipf distribution with the given number of elements and
      * exponent.
+     * <p>
+     * <b>Note:</b> this constructor will implicitly create an instance of
+     * {@link Well19937c} as random generator to be used for sampling only (see
+     * {@link #sample()} and {@link #sample(int)}). In case no sampling is
+     * needed for the created distribution, it is advised to pass {@code null}
+     * as random generator via the appropriate constructors to avoid the
+     * additional initialisation overhead.
      *
      * @param numberOfElements Number of elements.
      * @param exponent Exponent.