LinearCongruentialGenerator Constructor (Int64, Int64, Int64, Int64)Encog Machine Learning Framework for .Net
Create a LCG with the specified modulus, multiplier and increment. Unless you REALLY KNOW WHAT YOU ARE DOING, just use the constructor that just takes a seed. It will set these values to the same as set by the GCC C compiler. Setting these values wrong can create fairly useless random numbers.

Namespace: Encog.MathUtil
Assembly: encog-core-cs (in encog-core-cs.dll) Version: (

public LinearCongruentialGenerator(
	long modulus,
	long multiplier,
	long increment,
	long seed


Type: System Int64
The modulus for the LCG algorithm.
Type: System Int64
The multiplier for the LCG algorithm.
Type: System Int64
The increment for the LCG algorithm.
Type: System Int64
The seed for the LCG algorithm. Using the same seed will give the same random number sequence each time, whether in Java or DotNet.
See Also