sample

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

Draws a single random value from this Laplace distribution using inverse CDF sampling.

Generates a uniform random variable shifted to the range (-0.5, 0.5) and applies the inverse CDF transform to produce a Laplace-distributed value.

Return

a random value drawn from this distribution.

Parameters

random

the source of randomness.