@Reference(authors="S. Vigna", title="An experimental exploration of Marsaglia\'s xorshift generators, scrambled", booktitle="", url="http://vigna.di.unimi.it/ftp/papers/xorshift.pdf") public class XorShift1024NonThreadsafeRandom extends Random
Random
class, using a different
random number generation strategy. Java's random generator is optimized for
speed, but may lack the randomness needed for more complex experiments.
This approach is based on the work on XorShift1024* by Sebastiano Vigna, with
the original copyright statement:
Written in 2014 by Sebastiano Vigna (vigna@acm.org) To the extent possible under law, the author has dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/
Modifier and Type | Field and Description |
---|---|
(package private) int |
p
For rotating amongst states
|
private static long |
serialVersionUID
Serial version number.
|
private long[] |
x
State of random number generator.
|
Constructor and Description |
---|
XorShift1024NonThreadsafeRandom()
Constructor called only by localRandom.initialValue.
|
XorShift1024NonThreadsafeRandom(long seed)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
next(int bits) |
long |
nextLong() |
void |
setSeed(long seed) |
private static final long serialVersionUID
private long[] x
int p
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.