Produces a random integral value from a Poisson distribution.
Synopsis
Declared in <absl/random/distributions.h>
template<
typename IntType,
typename URBG>
IntType
Poisson(
URBG&& urbg,
double mean = 1.0);
Description
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);
Return Value
A random value drawn from the Poisson distribution.
Parameters
Name |
Description |
urbg |
The uniform random bit generator. |
mean |
The mean number of events per interval. |
Created with MrDocs