ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/SplittableRandom.java
(Generate patch)

Comparing jsr166/src/main/java/util/SplittableRandom.java (file contents):
Revision 1.1 by dl, Wed Jul 10 15:40:19 2013 UTC vs.
Revision 1.3 by jsr166, Thu Jul 11 03:31:26 2013 UTC

# Line 40 | Line 40 | import java.util.stream.DoubleStream;
40   * A generator of uniform pseudorandom values applicable for use in
41   * (among other contexts) isolated parallel computations that may
42   * generate subtasks. Class SplittableRandom supports methods for
43 < * producing pseudorandom nunmbers of type {@code int}, {@code long},
43 > * producing pseudorandom numbers of type {@code int}, {@code long},
44   * and {@code double} with similar usages as for class
45   * {@link java.util.Random} but differs in the following ways: <ul>
46   *
# Line 74 | Line 74 | import java.util.stream.DoubleStream;
74   * </ul>
75   *
76   * @author  Guy Steele
77 + * @author  Doug Lea
78   * @since   1.8
79   */
80   public class SplittableRandom {
# Line 112 | Line 113 | public class SplittableRandom {
113       * The value of gamma differs for each instance across a series of
114       * splits, and is generated using a slightly stripped-down variant
115       * of the same algorithm, but operating across calls to split(),
116 <     * not calls to nextLong(): Each instance carries the state of
116 >     * not calls to nextSeed(): Each instance carries the state of
117       * this generator as nextSplit, and uses mix64(nextSplit) as its
118       * own gamma value. Computations of gammas themselves use a fixed
119       * constant as the second argument to the addGammaModGeorge
# Line 752 | Line 753 | public class SplittableRandom {
753  
754      /**
755       * Returns a stream with the given {@code streamSize} number of
756 <     * pseudorandom {@code double} values.
756 >     * pseudorandom {@code double} values, each between {@code 0.0}
757 >     * (inclusive) and {@code 1.0} (exclusive).
758       *
759       * @param streamSize the number of values to generate
760       * @return a stream of {@code double} values
# Line 770 | Line 772 | public class SplittableRandom {
772  
773      /**
774       * Returns an effectively unlimited stream of pseudorandom {@code
775 <     * double} values.
775 >     * double} values, each between {@code 0.0} (inclusive) and {@code
776 >     * 1.0} (exclusive).
777       *
778       * @implNote This method is implemented to be equivalent to {@code
779       * doubles(Long.MAX_VALUE)}.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines