public class XorGensRandomGenerator extends AbstractRandomGenerator
| Constructor and Description |
|---|
XorGensRandomGenerator()
Creates a new generator, initializing its seed with
Util.randomSeed(). |
XorGensRandomGenerator(long seed)
Creates a new generator using a given seed.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
nextBoolean() |
void |
nextBytes(byte[] bytes) |
double |
nextDouble() |
float |
nextFloat() |
int |
nextInt() |
int |
nextInt(int n) |
long |
nextLong() |
long |
nextLong(long n) |
void |
setSeed(long seed) |
clear, nextGaussian, setSeed, setSeedpublic XorGensRandomGenerator()
Util.randomSeed().public XorGensRandomGenerator(long seed)
seed - a nonzero seed for the generator (if zero, the generator will be seeded with -1).public void setSeed(long seed)
setSeed in interface RandomGeneratorsetSeed in class AbstractRandomGeneratorpublic long nextLong()
nextLong in interface RandomGeneratornextLong in class AbstractRandomGeneratorpublic int nextInt()
nextInt in interface RandomGeneratornextInt in class AbstractRandomGeneratorpublic int nextInt(int n)
nextInt in interface RandomGeneratornextInt in class AbstractRandomGeneratorpublic long nextLong(long n)
public double nextDouble()
nextDouble in interface RandomGeneratornextDouble in class AbstractRandomGeneratorpublic float nextFloat()
nextFloat in interface RandomGeneratornextFloat in class AbstractRandomGeneratorpublic boolean nextBoolean()
nextBoolean in interface RandomGeneratornextBoolean in class AbstractRandomGeneratorpublic void nextBytes(byte[] bytes)
nextBytes in interface RandomGeneratornextBytes in class AbstractRandomGenerator