Seed
Module Hedgehog.Seed
Splittable pseudorandom number generator.
Wraps OCaml’s built-in Random.State which uses a splittable LXM algorithm.
type t = Stdlib.Random.State.tval from : int64 -> tCreate a seed from an int64 value.
val random : unit -> tCreate a random seed using the system clock.
val split : t -> t * tSplit a seed into two independent seeds.
val next_int64 : t -> int64 * tGenerate a random int64.
val next_int : int -> int -> t -> int * tnext_int lo hi seed generates a random int in the inclusive range [lo, hi].
val next_int64_range : int64 -> int64 -> t -> int64 * tnext_int64_range lo hi seed generates a random int64 in the inclusive range [lo, hi].
val next_float : float -> float -> t -> float * tnext_float lo hi seed generates a random float in the range [lo, hi).