org.encog.mathutil.randomize.generate
Class MultiplyWithCarryGenerateRandom
- java.lang.Object
-
- org.encog.mathutil.randomize.generate.AbstractGenerateRandom
-
- org.encog.mathutil.randomize.generate.AbstractBoxMuller
-
- org.encog.mathutil.randomize.generate.MultiplyWithCarryGenerateRandom
-
- All Implemented Interfaces:
- GenerateRandom
public class MultiplyWithCarryGenerateRandom extends AbstractBoxMuller
In Multiply with Carry (MWC) is a pseudo random number generator computer science, multiply-with-carry (MWC) is a method invented by George Marsaglia for generating sequences of random integers based on an initial set from two to many thousands of randomly chosen seed values. The main advantages of the MWC method are that it invokes simple computer integer arithmetic and leads to very fast generation of sequences of random numbers with immense periods. This class was implemented using information from the following sources:
-
-
Field Summary
-
Fields inherited from class org.encog.mathutil.randomize.generate.AbstractBoxMuller
MU
-
-
Constructor Summary
Constructors Constructor and Description MultiplyWithCarryGenerateRandom()MultiplyWithCarryGenerateRandom(long seed)MultiplyWithCarryGenerateRandom(long[] seeds, long carry, int r, long multiplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleannextBoolean()doublenextDouble()floatnextFloat()intnextInt()longnextLong()-
Methods inherited from class org.encog.mathutil.randomize.generate.AbstractBoxMuller
nextGaussian
-
Methods inherited from class org.encog.mathutil.randomize.generate.AbstractGenerateRandom
nextDouble, nextDouble, nextInt, nextInt
-
-
-
-
Constructor Detail
-
MultiplyWithCarryGenerateRandom
public MultiplyWithCarryGenerateRandom(long seed)
-
MultiplyWithCarryGenerateRandom
public MultiplyWithCarryGenerateRandom()
-
MultiplyWithCarryGenerateRandom
public MultiplyWithCarryGenerateRandom(long[] seeds, long carry, int r, long multiplier)
-
-
Method Detail
-
nextDouble
public double nextDouble()
- Returns:
- The next random double.
-
nextLong
public long nextLong()
- Returns:
- The next random long.
-
nextBoolean
public boolean nextBoolean()
- Returns:
- The next random boolean.
-
nextFloat
public float nextFloat()
- Returns:
- The next random floating point.
-
nextInt
public int nextInt()
- Returns:
- The next random integer.
-
-
DMelt 3.0 © DataMelt by jWork.ORG