public class PoissonSampler extends SamplerBase implements DiscreteSampler
Devroye, Luc. (1981).The Computer Generation of Poisson Random Variables
Computing vol. 26 pp. 197-207.
| Constructor and Description |
|---|
PoissonSampler(UniformRandomProvider rng,
double mean) |
| Modifier and Type | Method and Description |
|---|---|
int |
sample()
Creates a sample.
|
String |
toString() |
nextDouble, nextInt, nextIntpublic PoissonSampler(UniformRandomProvider rng, double mean)
rng - Generator of uniformly distributed random numbers.mean - Mean.IllegalArgumentException - if mean <= 0.public int sample()
sample in interface DiscreteSamplerpublic String toString()
toString in class SamplerBaseCopyright © 2016 The Apache Software Foundation. All rights reserved.