Module Generator.Random

Random Number Generators

val lcg : ?width:int -> ?min:int -> ?max:int -> int -> t

lcg ~min ~max seed a linear congruential generator, that produces a sequence of pseudorandom values that lies in the range between min and max (all inclusive).

  • parameter min

    (defaults to 0)

  • parameter max

    (defaults to 1^30)

val byte : int -> t

byte seed the same as lcg ~min:0 ~max:255 seed

module Seeded : sig ... end

Self seeded generators.