Stats.GenSourceGenerative distributions.
Implementation of generative distributions parameterized by stateful RNG implementation.
Instantiation of the Make functor with Random.State.
include Stats_intf.Gen with type state = Random.State.tFollows the module type of a sampling-based monad
include Basic_structures.Basic_intf.Monad
with type 'a t = (state, 'a) Stats_intf.gen
and type 'a res = (state, 'a) Stats_intf.gen'a t is the type of computations of type 'a
'a res is the outcome of running a computation of type 'a
uniform elts samples an element of the elts array by sampling an index uniformly.
geometric p samples a nonnegative integer according to the geometric law of parameter p.
of_empirical emp samples from emp matching exactly the empirical frequencies.
Gaussian distribution via Box-Muller transform. Returns a pair of independent gaussian variates with prescribed mean and standard deviation.
Gaussian distribution (wrapper over box-muller transform).
Poisson distribution via inverse transform. Consider using other methods for large lambda.
Samples uniformly in the given range.
Categorical distribution. Total mass need not be one. Does not aggregate mass of equal elements.
sample_without_replacement n l samples a subset of size n from l without replacement.