[#absl-poisson_distribution] = xref:absl.adoc[absl]::poisson_distribution :relfileprefix: ../ :mrdocs: A distribution that generates discrete Poisson‐distributed variates. == Synopsis Declared in `<absl/random/poisson_distribution.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- 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 [cols="1,4"] |=== | Name| Description | xref:absl/poisson_distribution/param_type.adoc[`param_type`] | The parameter set of the distribution. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:absl/poisson_distribution/result_type.adoc[`result_type`] | The type of the values produced by the distribution. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:absl/poisson_distribution/2constructor-03.adoc[`poisson_distribution`] [.small]#[constructor]# | Constructors | xref:absl/poisson_distribution/max.adoc[`max`] | Returns the largest value the distribution can produce. | xref:absl/poisson_distribution/mean.adoc[`mean`] | Returns the mean of the distribution. | xref:absl/poisson_distribution/min.adoc[`min`] | Returns the smallest value the distribution can produce. | xref:absl/poisson_distribution/operator_call-09.adoc[`operator()`] | Function call operators | xref:absl/poisson_distribution/param-00.adoc[`param`] | `param` overloads | xref:absl/poisson_distribution/reset.adoc[`reset`] | Resets the internal state of the distribution. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:absl/operator_not_eq-09d.adoc[absl::operator!=]` | Compares two distributions for inequality. | `xref:absl/operator_eq-021.adoc[absl::operator==]` | Compares two distributions for equality. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#