[cvs] / jsr166 / src / main / java / util / SplittableRandom.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/SplittableRandom.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Wed Jul 10 15:40:19 2013 UTC revision 1.2, Wed Jul 10 23:42:43 2013 UTC
# Line 74  Line 74 
74   * </ul>   * </ul>
75   *   *
76   * @author  Guy Steele   * @author  Guy Steele
77     * @author  Doug Lea
78   * @since   1.8   * @since   1.8
79   */   */
80  public class SplittableRandom {  public class SplittableRandom {
# Line 112  Line 113 
113       * The value of gamma differs for each instance across a series of       * The value of gamma differs for each instance across a series of
114       * splits, and is generated using a slightly stripped-down variant       * splits, and is generated using a slightly stripped-down variant
115       * of the same algorithm, but operating across calls to split(),       * of the same algorithm, but operating across calls to split(),
116       * not calls to nextLong(): Each instance carries the state of       * not calls to nextSeed(): Each instance carries the state of
117       * this generator as nextSplit, and uses mix64(nextSplit) as its       * this generator as nextSplit, and uses mix64(nextSplit) as its
118       * own gamma value. Computations of gammas themselves use a fixed       * own gamma value. Computations of gammas themselves use a fixed
119       * constant as the second argument to the addGammaModGeorge       * constant as the second argument to the addGammaModGeorge
# Line 752  Line 753 
753    
754      /**      /**
755       * Returns a stream with the given {@code streamSize} number of       * Returns a stream with the given {@code streamSize} number of
756       * pseudorandom {@code double} values.       * 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       * @param streamSize the number of values to generate
760       * @return a stream of {@code double} values       * @return a stream of {@code double} values
# Line 770  Line 772 
772    
773      /**      /**
774       * Returns an effectively unlimited stream of pseudorandom {@code       * Returns an effectively unlimited stream of pseudorandom {@code
775       * double} values.       * 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       * @implNote This method is implemented to be equivalent to {@code
779       * doubles(Long.MAX_VALUE)}.       * doubles(Long.MAX_VALUE)}.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8