Produces a random integral value from a Poisson distribution.
Declared in <absl/random/distributions.h>
template<
typename IntType,
typename URBG>
IntType
Poisson(
URBG&& urbg,
double mean = 1.0);
absl::Poisson produces discrete probabilities for a given number of events occurring within a fixed interval within the closed interval [0, max]. T must be an integral type.
See https://en.wikipedia.org/wiki/Poisson_distribution
Example:
absl::BitGen bitgen; ... int requests_per_minute = absl::Poisson<int>(bitgen, 3.2);
A random value drawn from the Poisson distribution.
| Name | Description |
|---|---|
| urbg | The uniform random bit generator. |
| mean | The mean number of events per interval. |