Class RandomDistribution.Flat

java.lang.Object
org.apache.hadoop.hbase.util.RandomDistribution.Flat
All Implemented Interfaces:
RandomDistribution.DiscreteRNG
Enclosing class:
RandomDistribution

public static final class RandomDistribution.Flat extends Object implements RandomDistribution.DiscreteRNG
P(i)=1/(max-min)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
    private final int
     
    private final Random
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Flat(Random random, int min, int max)
    Generate random integers from min (inclusive) to max (exclusive) following even distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the next random number

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait