Interface LinearCongruentialGenerator
-
- All Superinterfaces:
RandomLongGenerator
,RandomNumberGenerator
,Seedable
- All Known Implementing Classes:
CompositeLinearCongruentialGenerator
,LEcuyer
,Lehmer
,MRG
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,MersenneTwister
andMWC8222
. If, however, only a small number of random numbers are needed, e.g,. a few thousands, then an LCG should be sufficient.- See Also:
- Wikipedia: Linear congruential generator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
modulus()
Get the modulus of this linear congruential generator.int
order()
Get the order of recursion.-
Methods inherited from interface dev.nm.stat.random.rng.univariate.RandomLongGenerator
nextLong
-
Methods inherited from interface dev.nm.stat.random.rng.univariate.RandomNumberGenerator
nextDouble
-
-