Module Random.Seeded

Self seeded generators.

These generators will be seeded by a value derived from the Machine identifier.

val create : ?width:int -> (int -> t) -> t

create init creates a self-seeded generator from a regular generator.

Caveats:

The init function can use only one of the two generator constructors to create a generator:

  • Random.lcg
  • Random.byte
val lcg : ?width:int -> ?min:int -> ?max:int -> unit -> t

lcg ~min ~max () a linear congruential generator.

val byte : t

byte is the same as lcg ~min:0 ~max:255 ()