Package org.apache.commons.rng
Interface LongJumpableUniformRandomProvider
-
- All Superinterfaces:
JumpableUniformRandomProvider
,UniformRandomProvider
public interface LongJumpableUniformRandomProvider extends JumpableUniformRandomProvider
Applies to generators that can be advanced a very large number of steps of the output sequence in a single operation.- Since:
- 1.3
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JumpableUniformRandomProvider
longJump()
Creates a copy of the JumpableUniformRandomProvider and then advances the state of the current instance.-
Methods inherited from interface org.apache.commons.rng.JumpableUniformRandomProvider
jump
-
Methods inherited from interface org.apache.commons.rng.UniformRandomProvider
nextBoolean, nextBytes, nextBytes, nextDouble, nextFloat, nextInt, nextInt, nextLong, nextLong
-
-
-
-
Method Detail
-
longJump
JumpableUniformRandomProvider longJump()
Creates a copy of the JumpableUniformRandomProvider and then advances the state of the current instance. The copy is returned.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 wherem
is the long jump length andn
is the jump length of theJumpableUniformRandomProvider.jump()
method.- Returns:
- A copy of the current state.
-
-