public static final class MarsagliaTsangWangDiscreteSampler.Poisson extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static SharedStateDiscreteSampler |
of(org.apache.commons.rng.UniformRandomProvider rng,
double mean) |
Creates a sampler for the Poisson distribution.
|
public static SharedStateDiscreteSampler of(org.apache.commons.rng.UniformRandomProvider rng, double mean)
Any probability less than 2-31 will not be observed in samples.
Storage requirements depend on the tabulated probability values. Example storage requirements are listed below.
mean table size kB 0.25 882 0.88 0.5 1135 1.14 1 1200 1.20 2 1451 1.45 4 1955 1.96 8 2961 2.96 16 4410 4.41 32 6115 6.11 64 8499 8.50 128 11528 11.53 256 15935 31.87 512 20912 41.82 1024 30614 61.23
Note: Storage changes to 2 bytes per index between mean=128
and mean=256
.
rng
- Generator of uniformly distributed random numbers.mean
- Mean.java.lang.IllegalArgumentException
- if mean <= 0
or mean > 1024
.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.