public interface LongJumpableUniformRandomProvider extends JumpableUniformRandomProvider
Modifier and Type | Method and Description |
---|---|
JumpableUniformRandomProvider |
longJump()
Creates a copy of the JumpableUniformRandomProvider and then advances the
state of the current instance.
|
default Stream<JumpableUniformRandomProvider> |
longJumps()
Returns an effectively unlimited stream of new random generators, each of which
implements the
JumpableUniformRandomProvider interface. |
default Stream<JumpableUniformRandomProvider> |
longJumps(long streamSize)
Returns a stream producing the given
streamSize number of new random
generators, each of which implements the JumpableUniformRandomProvider
interface. |
jump, jumps, jumps
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
JumpableUniformRandomProvider longJump()
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 long 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 long jump for use in parallel computations.
The returned copy may be jumped m / n
times before overlap with the current
instance where m
is the long jump length and n
is the jump length of the JumpableUniformRandomProvider.jump()
method.
default Stream<JumpableUniformRandomProvider> longJumps()
JumpableUniformRandomProvider
interface.default Stream<JumpableUniformRandomProvider> longJumps(long streamSize)
streamSize
number of new random
generators, each of which implements the JumpableUniformRandomProvider
interface.streamSize
- Number of objects to generate.streamSize
.IllegalArgumentException
- if streamSize
is negative.Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.