public class FastNonThreadsafeRandom extends Random
Random
, but not using atomic long
seeds. This implementation is no longer thread-safe (but faster)!Modifier and Type | Field and Description |
---|---|
private static long |
addend |
private static long |
mask |
private static long |
multiplier |
private long |
seed
The random seed.
|
private static long |
serialVersionUID
Serial version number.
|
Constructor and Description |
---|
FastNonThreadsafeRandom()
Constructor called only by localRandom.initialValue.
|
FastNonThreadsafeRandom(long seed)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
next(int bits) |
void |
setSeed(long seed) |
nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong
private static final long serialVersionUID
private static final long multiplier
private static final long addend
private static final long mask
private long seed
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.