public class FastThreadedRandom
extends java.util.Random
Modifier and Type | Field and Description |
---|---|
protected java.util.Random[] |
prngs
The random number generators.
|
protected int |
threadingmask
Mask for distributing threads.
|
Constructor and Description |
---|
FastThreadedRandom()
Creates the wrapper.
|
FastThreadedRandom(java.lang.Class<?> randomclazz)
Creates the wrapper.
|
FastThreadedRandom(java.lang.Class<?> randomclazz,
int threadinglevel)
Creates the wrapper.
|
Modifier and Type | Method and Description |
---|---|
boolean |
nextBoolean()
Wrapper method.
|
void |
nextBytes(byte[] bytes)
Wrapper method.
|
double |
nextDouble()
Wrapper method.
|
float |
nextFloat()
Wrapper method.
|
double |
nextGaussian()
Wrapper method.
|
int |
nextInt()
Wrapper method.
|
int |
nextInt(int bound)
Wrapper method.
|
long |
nextLong()
Wrapper method.
|
void |
setSeed(long seed)
Wrapper method.
|
protected java.util.Random[] prngs
protected int threadingmask
public FastThreadedRandom()
public FastThreadedRandom(java.lang.Class<?> randomclazz)
public FastThreadedRandom(java.lang.Class<?> randomclazz, int threadinglevel)
public boolean nextBoolean()
nextBoolean
in class java.util.Random
public void nextBytes(byte[] bytes)
nextBytes
in class java.util.Random
public double nextDouble()
nextDouble
in class java.util.Random
public float nextFloat()
nextFloat
in class java.util.Random
public double nextGaussian()
nextGaussian
in class java.util.Random
public int nextInt()
nextInt
in class java.util.Random
public int nextInt(int bound)
nextInt
in class java.util.Random
public long nextLong()
nextLong
in class java.util.Random
public void setSeed(long seed)
setSeed
in class java.util.Random