public class BinomialRandomVariable extends AbstractDiscreteRandomVariable
Constructor and Description |
---|
BinomialRandomVariable()
Default constructor.
|
BinomialRandomVariable(int n,
double p)
Create a random variable with the given number of trials and probability
of success.
|
BinomialRandomVariable(int n,
double p,
RNG source)
Create a random variable with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
nextRandomVariable()
Access the next random variable from this generator.
|
static int |
nextRandomVariable(int n,
double p,
RNG source)
Access the next random variable using the given generator.
|
public BinomialRandomVariable()
public BinomialRandomVariable(int n, double p)
n
- the number of trials.p
- the probability of success.public BinomialRandomVariable(int n, double p, RNG source)
n
- the number of trials.p
- the probability of success.source
- the source generator.public static int nextRandomVariable(int n, double p, RNG source)
n
- the number of trials.p
- the probability of success.source
- the source generator.public int nextRandomVariable()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics