sample

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

Draws a single random value from this Bernoulli distribution.

Returns 1 (success) with probability probability and 0 (failure) otherwise.

Return

0 or 1.

Parameters

random

the source of randomness.