M.MakeSeededMakeSeeded(K)(V) is a variant backed by Hashtbl.SeededS.
module K : Hashtbl.SeededHashedTypeval create : ?random:bool -> int -> tcreate ?random cap is a new map with capacity cap.
~random randomizes the underlying hash table. It defaults to false. See Hashtbl.create.
Note. The internal hash table is created with size cap.
val is_empty : t -> boolis_empty t is true iff there are no bindings in t.
val size : t -> intsize t is the number of bindings in t.
val weight : t -> intweight t is the combined weight of bindings in t.
val resize : int -> t -> unitresize cap t sets t's capacity to cap, while leaving the bindings unchanged.
val trim : t -> unittrim t ensures that weight t <= capacity t by dropping bindings in LRU-to-MRU order.
kfind k t is Some v when k -> v is bound in t, or None otherwise.
Note This operation does not change the recently-used order.
promote k t promotes the binding for k, if it exists, to most-recently-used.
add k v t adds the binding k -> v to t as the most-recently-used binding.
Note add does not remove bindings. To ensure that the resulting map is not over capacity, combine with trim.
lru t is the least-recently-used binding in t, or None, when t is empty.
val drop_lru : t -> unitdrop_lru t removes the binding lru t.
fold f z t is f k0 v0 (... (f kn vn z)), where k0 -> v0 is LRU and kn -> vn is MRU.
iter f t applies f to all the bindings in t in in LRU-to-MRU order.
val pp :
?pp_size:(Format.formatter -> (int * int) -> unit) ->
?sep:(Format.formatter -> unit -> unit) ->
(Format.formatter -> (k * v) -> unit) ->
Format.formatter ->
t ->
unit