sample

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

Draws a single random value from this hypergeometric distribution.

For small draws (< 25) or when the normal approximation is unreliable, uses direct simulation of the drawing process. For large draws with sufficient variance, uses a normal approximation for O(1) sampling instead of O(draws).

Return

a random integer representing the number of success items drawn.

Parameters

random

the source of randomness.