375 |
|
* may, and typically does, vary across program invocations. |
376 |
|
*/ |
377 |
|
public SplittableRandom() { // emulate defaultGen.split() |
378 |
< |
long s = defaultGen.getAndAdd(2 * GOLDEN_GAMMA); |
378 |
> |
long s = defaultGen.getAndAdd(GOLDEN_GAMMA << 1); |
379 |
|
this.seed = mix64(s); |
380 |
|
this.gamma = mixGamma(s + GOLDEN_GAMMA); |
381 |
|
} |
779 |
|
* @return a stream of pseudorandom {@code double} values, |
780 |
|
* each with the given origin (inclusive) and bound (exclusive) |
781 |
|
* @throws IllegalArgumentException if {@code streamSize} is |
782 |
< |
* less than zero |
783 |
< |
* @throws IllegalArgumentException if {@code randomNumberOrigin} |
782 |
> |
* less than zero, or {@code randomNumberOrigin} |
783 |
|
* is greater than or equal to {@code randomNumberBound} |
784 |
|
*/ |
785 |
|
public DoubleStream doubles(long streamSize, double randomNumberOrigin, |