[Stdlib] Hashtbl: add a getter for randomize

master
François Bobot 2014-02-03 20:30:07 +01:00
parent e402d38dfe
commit 189d29bfcf
2 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,7 @@ let randomized_default =
let randomized = ref randomized_default
let randomize () = randomized := true
let is_randomized () = !randomized
let prng = lazy (Random.State.make_self_init())

View File

@ -182,6 +182,11 @@ val randomize : unit -> unit
@since 4.00.0 *)
val is_randomized : unit -> bool
(** return if the tables are currently created in randomized mode by default
@since 4.02.0 *)
type statistics = {
num_bindings: int;
(** Number of bindings present in the table.