sample

open override fun sample(random: Random): Int(source)

Draws a single random value from this logarithmic distribution using the Kemp (1981) algorithm, which runs in O(1) expected time per draw.

Return

a random positive integer drawn from this distribution.

Parameters

random

the source of randomness.