commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [math] Javadoc.
Date Mon, 23 May 2016 22:38:56 GMT
Repository: commons-math
Updated Branches:
  refs/heads/task-MATH-1366 34eba8132 -> c82bb1b56


Javadoc.


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

Branch: refs/heads/task-MATH-1366
Commit: c82bb1b56ae4429f5e92f56e289ee9ba2dc14d03
Parents: 34eba81
Author: Gilles <gilles@harfang.homelinux.org>
Authored: Mon May 23 17:46:57 2016 +0200
Committer: Gilles <gilles@harfang.homelinux.org>
Committed: Mon May 23 17:46:57 2016 +0200

----------------------------------------------------------------------
 .../apache/commons/math4/rng/RandomSource.java  | 29 ++++++++++----------
 1 file changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/c82bb1b5/src/main/java/org/apache/commons/math4/rng/RandomSource.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/rng/RandomSource.java b/src/main/java/org/apache/commons/math4/rng/RandomSource.java
index 087960c..53f2b8e 100644
--- a/src/main/java/org/apache/commons/math4/rng/RandomSource.java
+++ b/src/main/java/org/apache/commons/math4/rng/RandomSource.java
@@ -31,7 +31,7 @@ import org.apache.commons.math4.rng.internal.source64.TwoCmres;
  * </code></pre>
  * or
  * <pre><code>
- *  final int[] seed = new int[] { 196, 9, 0, 226  };
+ *  final int[] seed = new int[] { 196, 9, 0, 226 };
  *  UniformRandomProvider rng = RandomSource.create(RandomSource.MT, seed);
  * </code></pre>
  * or
@@ -44,8 +44,8 @@ import org.apache.commons.math4.rng.internal.source64.TwoCmres;
  * (optional) seed.
  * <br>
  * In the first form, a random seed will be {@link SeedFactory generated
- * automatically}; the random seed generation step is explicit in the
- * third form.
+ * automatically}; in the second form, a fixed seed is used; a random seed
+ * is explicitly generated in the third form.
  * </p>
  *
  * <p>
@@ -68,22 +68,22 @@ import org.apache.commons.math4.rng.internal.source64.TwoCmres;
  * internal state.
  * <br>
  * When the seed value passed by the caller is of the native type, it is
- * expected that the sequences produced will be the same as those
- * produced by other implementations of the algorithm.
+ * expected that the sequences produced will be identical to those
+ * produced by other implementations of the same reference algorithm.
  * <br>
  * However, when the seed value passed by the caller is not of the native
  * type, a transformation is performed by this library and the resulting
  * native type value will <i>not</i> contain more information than the
  * original seed value.
  * If the algorithm's native type is "simpler" than the type passed by
- * the caller, then some (unuse) information will even be lost.
+ * the caller, then some (unused) information will even be lost.
  * <br>
  * The transformation from non-native to native seed type is arbitrary,
  * as long as it does not reduce the amount of information required by
  * the algorithm to initialize its state.
- * The consequence of the transformation is that the sequences produced
- * by this library may not be the same as the sequences produced by other
- * implementations of the same algorithm!
+ * The consequence of the transformation is that sequences produced
+ * by this library may <i>not</i> be the same as the sequences produced
+ * by other implementations of the same algorithm!
  * </p>
  *
  * <p>
@@ -93,11 +93,12 @@ import org.apache.commons.math4.rng.internal.source64.TwoCmres;
  * generators factory method}.
  * <br>
  * Although the seed-generating methods defined in this class will likely
- * return different values for all calls, there is no guarantee that the
- * produced seed will result always in a "good" sequence of numbers, even
- * if the generator is good.
+ * return different values each time they are called, there is no guarantee
+ * that the resulting "seed" will always generate a <i>good</i> (i.e.
+ * sufficiently uniformly random for the intended purpose) sequence of
+ * numbers, even if the generator is good!
  * The only way to ensure that the selected seed will make the generator
- * produce a "good" sequence is to submit that sequence to a series of
+ * produce a good sequence is to submit that sequence to a series of
  * stringent tests, as provided by tools such as
  * <a href="http://www.phy.duke.edu/~rgb/General/dieharder.php">dieharder</a>
  * or <a href="http://simul.iro.umontreal.ca/testu01/tu01.html">TestU01</a>.
@@ -133,7 +134,7 @@ import org.apache.commons.math4.rng.internal.source64.TwoCmres;
  * used for {@link #restoreState(UniformRandomProvider,State) restoring}
  * a generator (of the same type) to an identical state (e.g. to allow
  * persistent storage, or to continue a sequence from where the original
- * instance left off.).
+ * instance left off).
  * </p>
  *
  * @since 4.0


Mime
View raw message