public static final class RandomDistribution.Binomial extends Object implements RandomDistribution.DiscreteRNG
Modifier and Type | Field and Description |
---|---|
private int |
min |
private int |
n |
private Random |
random |
private double[] |
v |
Constructor and Description |
---|
Binomial(Random random,
int min,
int max,
double p)
Generate random integers from min (inclusive) to max (exclusive)
following Binomial distribution.
|
Modifier and Type | Method and Description |
---|---|
int |
nextInt()
Get the next random number
|
private static double |
power(double p,
int k) |
private static double |
select(int n,
int k) |
private static double select(int n, int k)
private static double power(double p, int k)
public int nextInt()
RandomDistribution.DiscreteRNG
nextInt
in interface RandomDistribution.DiscreteRNG
RandomDistribution.DiscreteRNG.nextInt()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.