public interface JumpableUniformRandomProvider extends UniformRandomProvider
Modifier and Type | Method and Description |
---|---|
UniformRandomProvider |
jump()
Creates a copy of the UniformRandomProvider and then advances the
state of the current instance.
|
default Stream<UniformRandomProvider> |
jumps()
Returns an effectively unlimited stream of new random generators, each of which
implements the
UniformRandomProvider interface. |
default Stream<UniformRandomProvider> |
jumps(long streamSize)
Returns a stream producing the given
streamSize number of new random
generators, each of which implements the UniformRandomProvider
interface. |
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextBytes, nextDouble, nextDouble, nextDouble, nextFloat, nextFloat, nextFloat, nextInt, nextInt, nextInt, nextLong, nextLong, nextLong
UniformRandomProvider jump()
The current state will be advanced in a single operation by the equivalent of a number of sequential calls to a method that updates the state of the provider. The size of the jump is implementation dependent.
Repeat invocations of this method will create a series of generators that are uniformly spaced at intervals of the output sequence. Each generator provides non-overlapping output for the length of the jump for use in parallel computations.
default Stream<UniformRandomProvider> jumps()
UniformRandomProvider
interface.default Stream<UniformRandomProvider> jumps(long streamSize)
streamSize
number of new random
generators, each of which implements the UniformRandomProvider
interface.streamSize
- Number of objects to generate.streamSize
.IllegalArgumentException
- if streamSize
is negative.Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.