public class XorshiftRandom extends Random
Random that implements the Xorshift random
number generator.
https://en.wikipedia.org/wiki/Xorshift
Reference:
George Marsaglia. 2003. Xorshift RNGs. Journal of Statistical Software 8, 14
(2003), 1–6. https://www.jstatsoft.org/article/view/v008i14| Constructor and Description |
|---|
XorshiftRandom() |
XorshiftRandom(int salt)
Constructor that receives an integer as 'salt'.
|
XorshiftRandom(long seed) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
next(int bits) |
long |
nextLong() |
public XorshiftRandom()
public XorshiftRandom(int salt)
salt - a number used to generate the seed.public XorshiftRandom(long seed)
Copyright © 2020. All rights reserved.