A random number generator that focuses on speed and lack of inter-thread
interference, rather than on the quality of the numbers returned. The
object SimpleRandom
is striped internally to reduce
contention when accessed from multiple threads. The class SimpleRandom
should only be used by a single thread.
A random number generator that focuses on speed and lack of inter-thread
interference, rather than on the quality of the numbers returned. The
object SimpleRandom
is striped internally to reduce
contention when accessed from multiple threads. The class SimpleRandom
should only be used by a single thread.
The constants in this 64-bit linear congruential random number generator are from http://nuclear.llnl.gov/CNP/rng/rngman/node4.html.
- Authors
Nathan Bronson
- Companion
- class
Value members
Concrete methods
Returns a random value chosen from a uniform distribution of all valid
Int
s.
Returns a random value chosen from a uniform distribution of all valid
Int
s.
Returns a random value chosen from a uniform distribution of the
non-negative integers less than n
, or throws IllegalArgumentException
if n
is negative or zero.
Returns a random value chosen from a uniform distribution of the
non-negative integers less than n
, or throws IllegalArgumentException
if n
is negative or zero.