sample method
Returns a single sample of a random value within the distribution.
Implementation
@override
int sample({Random? random}) {
const uniform = UniformDistribution.standard();
var i = 0, b = 1.0;
while (b >= exp(-lambda)) {
b *= uniform.sample(random: random);
i++;
}
return i - 1;
}