jsat.utils.random
Class XOR128
- java.lang.Object
-
- java.util.Random
-
- jsat.utils.random.XOR128
-
- All Implemented Interfaces:
- java.io.Serializable
public class XOR128 extends java.util.RandomA fast PRNG that produces medium quality random numbers that passes the diehard tests. It has a period of 2128-1
See: G. Marsaglia. Xorshift RNGs. Journal of Statistical Software, 8, 14:1–9, 2003- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description XOR128()Creates a new PRNG with a random seedXOR128(long seed)Creates a new PRNG
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublenextDouble()longnextLong()voidsetSeed(long seed)
-
-
-
Constructor Detail
-
XOR128
public XOR128()
Creates a new PRNG with a random seed
-
XOR128
public XOR128(long seed)
Creates a new PRNG- Parameters:
seed- the seed that controls the initial state of the PRNG- See Also:
setSeed(long)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG