public interface LinearCongruentialGenerator extends RandomLongGenerator
A linear congruential generator (LCG) produces a sequence of pseudo-random numbers based on a linear recurrence relation. An LCG is simple to understand and implement, but it should not be used for applications where high-quality randomness is critical. The higher quality pseudo-random generators available are, for instances,
MWC8222. If, however, only a small number of random numbers are needed, e.g,. a few thousands, then an LCG should be sufficient.
- See Also:
orderint order()Get the order of recursion.
- the order of recursion
moduluslong modulus()Get the modulus of this linear congruential generator.
- the modulus