Package org.apache.hadoop.hbase.util
Class RandomDistribution.Zipf
java.lang.Object
org.apache.hadoop.hbase.util.RandomDistribution.Zipf
- All Implemented Interfaces:
RandomDistribution.DiscreteRNG
- Enclosing class:
- RandomDistribution
public static final class RandomDistribution.Zipf
extends Object
implements RandomDistribution.DiscreteRNG
Zipf distribution. The ratio of the probabilities of integer i and j is defined as follows:
P(i)/P(j)=((j-min+1)/(i-min+1))^sigma.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
DEFAULT_EPSILON
- See Also:
-
random
-
k
-
v
-
-
Constructor Details
-
Zipf
Constructor The random number generator. minimum integer (inclusvie) maximum integer (exclusive) parameter sigma. (sigma > 1.0) -
Zipf
Constructor. The random number generator. minimum integer (inclusvie) maximum integer (exclusive) parameter sigma. (sigma > 1.0) Allowable error percentage (0 < epsilon < 1.0).
-
-
Method Details
-
nextInt
Description copied from interface:RandomDistribution.DiscreteRNG
Get the next random number- Specified by:
nextInt
in interfaceRandomDistribution.DiscreteRNG
- Returns:
- the next random number.
- See Also:
-