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 of java.util.SplittableRandom to implement RandomGenerator.
  • Constructor Details

    • 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 Details

    • setSeed

      public void setSeed(int seed)
      Specified by:
      setSeed in interface org.apache.commons.math3.random.RandomGenerator
    • setSeed

      public void setSeed(int[] seed)
      Specified by:
      setSeed in interface org.apache.commons.math3.random.RandomGenerator
    • setSeed

      public void setSeed(long seed)
      Specified by:
      setSeed in interface org.apache.commons.math3.random.RandomGenerator
    • nextBytes

      public void nextBytes(byte[] bytes)
      Specified by:
      nextBytes in interface org.apache.commons.math3.random.RandomGenerator
    • nextInt

      public int nextInt()
      Specified by:
      nextInt in interface org.apache.commons.math3.random.RandomGenerator
    • nextInt

      public int nextInt(int n)
      Specified by:
      nextInt in interface org.apache.commons.math3.random.RandomGenerator
    • nextLong

      public long nextLong()
      Specified by:
      nextLong in interface org.apache.commons.math3.random.RandomGenerator
    • nextBoolean

      public boolean nextBoolean()
      Specified by:
      nextBoolean in interface org.apache.commons.math3.random.RandomGenerator
    • nextFloat

      public float nextFloat()
      Specified by:
      nextFloat in interface org.apache.commons.math3.random.RandomGenerator
    • nextDouble

      public double nextDouble()
      Specified by:
      nextDouble in interface org.apache.commons.math3.random.RandomGenerator
    • nextGaussian

      public double nextGaussian()
      Specified by:
      nextGaussian in interface org.apache.commons.math3.random.RandomGenerator