public class BinomialRNG extends Object implements RandomNumberGenerator
dbinom, pbinom, qbinom, rbinom.| Constructor and Description |
|---|
BinomialRNG(int n,
double p)
Construct a random number generator to sample from the binomial distribution.
|
BinomialRNG(int n,
double p,
RandomLongGenerator uniform)
Construct a random number generator to sample from the binomial distribution.
|
| Modifier and Type | Method and Description |
|---|---|
double |
nextDouble()
Get the next random
double. |
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public BinomialRNG(int n,
double p,
RandomLongGenerator uniform)
n - the number of trials, a natural numberp - the success probability in each trial, [0, 1]uniform - a uniform random number generatorpublic BinomialRNG(int n,
double p)
n - the number of trials, a natural numberp - the success probability in each trial, [0, 1]public void seed(long... seeds)
Seedablepublic double nextDouble()
RandomNumberGeneratordouble.nextDouble in interface RandomNumberGeneratorCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.