sample

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

Draws a single random value from this geometric distribution using inverse transform sampling.

Return

a random non-negative integer representing the number of failures before success.

Parameters

random

the source of randomness.