Package org.apache.solr.bench
Class SplittableRandomGenerator
- java.lang.Object
-
- org.apache.solr.bench.SplittableRandomGenerator
-
- All Implemented Interfaces:
org.apache.commons.math3.random.RandomGenerator
public class SplittableRandomGenerator extends Object implements org.apache.commons.math3.random.RandomGenerator
Extension ofjava.util.SplittableRandomto implementRandomGenerator.
-
-
Constructor Summary
Constructors Constructor Description SplittableRandomGenerator(long seed)Instantiates a new Splittable random generator.SplittableRandomGenerator(SplittableRandom random)Instantiates a new Splittable random generator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleannextBoolean()voidnextBytes(byte[] bytes)doublenextDouble()floatnextFloat()doublenextGaussian()intnextInt()intnextInt(int n)longnextLong()voidsetSeed(int seed)voidsetSeed(int[] seed)voidsetSeed(long seed)
-
-
-
Constructor Detail
-
SplittableRandomGenerator
public SplittableRandomGenerator(SplittableRandom random)
Instantiates a new Splittable random generator.- Parameters:
random- the random
-
SplittableRandomGenerator
public SplittableRandomGenerator(long seed)
Instantiates a new Splittable random generator.- Parameters:
seed- the seed
-
-
Method Detail
-
setSeed
public void setSeed(int seed)
- Specified by:
setSeedin interfaceorg.apache.commons.math3.random.RandomGenerator
-
setSeed
public void setSeed(int[] seed)
- Specified by:
setSeedin interfaceorg.apache.commons.math3.random.RandomGenerator
-
setSeed
public void setSeed(long seed)
- Specified by:
setSeedin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextBytes
public void nextBytes(byte[] bytes)
- Specified by:
nextBytesin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextInt
public int nextInt()
- Specified by:
nextIntin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextInt
public int nextInt(int n)
- Specified by:
nextIntin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextLong
public long nextLong()
- Specified by:
nextLongin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextBoolean
public boolean nextBoolean()
- Specified by:
nextBooleanin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextFloat
public float nextFloat()
- Specified by:
nextFloatin interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextDouble
public double nextDouble()
- Specified by:
nextDoublein interfaceorg.apache.commons.math3.random.RandomGenerator
-
nextGaussian
public double nextGaussian()
- Specified by:
nextGaussianin interfaceorg.apache.commons.math3.random.RandomGenerator
-
-