A distribution that generates discrete Poisson‐distributed variates.
Synopsis
Declared in <absl/random/poisson_distribution.h>
template<typename IntType = int>
class poisson_distribution;
Description
Generates discrete variates conforming to a Poisson distribution. p(n) = (meanˆn / n!) exp(‐mean)
Depending on the parameter, the distribution selects one of the following algorithms: * The standard algorithm, attributed to Knuth, extended using a split method for larger values * The "Ratio of Uniforms as a convenient method for sampling from classical discrete distributions", Stadlober, 1989. http://www.sciencedirect.com/science/article/pii/0377042790903495
NOTE: param_type.mean() is a double, which permits values larger than poisson_distribution<IntType>::max(), however this should be avoided and the distribution results are limited to the max() value.
The goals of this implementation are to provide good performance while still being thread‐safe: This limits the implementation to not using lgamma provided by <math.h>.
Types
Name |
Description |
The parameter set of the distribution. |
Type Aliases
Name |
Description |
The type of the values produced by the distribution. |
Member Functions
Name |
Description |
|
Constructors |
Returns the largest value the distribution can produce. |
|
Returns the mean of the distribution. |
|
Returns the smallest value the distribution can produce. |
|
Function call operators |
|
|
|
Resets the internal state of the distribution. |
Friends
Name |
Description |
Compares two distributions for inequality. |
|
Compares two distributions for equality. |
Created with MrDocs