Package org.apache.commons.rng
package org.apache.commons.rng
This package contains the library's interface to be used by client
code that needs a generator of sequences of pseudo-random numbers
that are uniformly distributed in a specified range.
Jumpable Generators
Interfaces are specified for generators that are capable of advancing forward a large number of steps in the output period of the generator in a single jump. This can be used to create a series of non-overlapping generators for use in multithreaded applications.
Note that there is not a one-to-one relationship between the number of output random values from a provider and the number of steps from the underlying state cycle. This is due to:
- Possible use of rejection algorithms to output a random value using multiple values from the state cycle.
- The number of bits required to generate a random value differing from the
number of bits generated by the underlying source of randomness. For example
generation of a 64-bit
longvalue using a 32-bit source of randomness.
Users are advised to use jumping generators with care to avoid overlapping output of multiple generators in parallel computations. A cautious approach is to use a jump distance far larger than the expected output length used by each generator.
-
InterfacesClassDescriptionApplies to generators that can be advanced an arbitrary number of steps of the output sequence in a single operation.Applies to generators that can be advanced a large number of steps of the output sequence in a single operation.Applies to generators that can be advanced a very large number of steps of the output sequence in a single operation.Marker interface for objects that represents the state of a random generator.Applies to generators whose internal state can be saved and restored.Applies to generators that can be split into two objects (the original and a new instance) each of which implements the same interface (and can be recursively split indefinitely).Applies to generators of random number sequences that follow a uniform distribution.