xn + 1 = a ⋅ xn + b (mod c)
For the default Java RNG the parameters a, b and c are as follows:
a = 0x5DEECE66D, b = 11, c = 248
The values can be changes by using the {@link LCG#LCG(long,long,long,long)} constructor but extreme care isadvised as LCGs exhibit very non-random behavior with ill-chosen parameters.
This class is not recommended for use in simulation for the poor quality of LCGs, other algorithms are better suited and should be used instead. It is mainly intended for experimentation with older results and tests with known bad generators. @author Jan Himmelspach @author Johannes Rössel
|
|