Package org.apache.hadoop.hbase.util
Class RandomDistribution.Binomial
java.lang.Object
org.apache.hadoop.hbase.util.RandomDistribution.Binomial
- All Implemented Interfaces:
RandomDistribution.DiscreteRNG
- Enclosing class:
- RandomDistribution
public static final class RandomDistribution.Binomial
extends Object
implements RandomDistribution.DiscreteRNG
Binomial distribution. P(k)=select(n, k)*p^k*(1-p)^(n-k) (k = 0, 1, ..., n)
P(k)=select(max-min-1, k-min)*p^(k-min)*(1-p)^(k-min)*(1-p)^(max-k-1)
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
random
-
min
-
n
-
v
-
-
Constructor Details
-
Binomial
Generate random integers from min (inclusive) to max (exclusive) following Binomial distribution. The basic random number generator. Minimum integer maximum integer (exclusive). parameter.
-
-
Method Details
-
select
-
power
-
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:
-