To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
MakeSeeded(K)(V) is a variant backed by
module K : Hashtbl.SeededHashedType
val create : ?random:bool -> int -> t
create ?random cap is a new map with capacity
~random randomizes the underlying hash table. It defaults to
Note. The internal hash table is created with size
val is_empty : t -> bool
is_empty t is
t is empty.
val items : t -> int
items t is the number of bindings in
val size : t -> int
size t is the combined weight of bindings in
val capacity : t -> int
capacity t is the maximum combined weight of bindings this map will hold before they start being discarded in least-recently-used order.
val trim : t -> unit
trim t discards bindings from
t, if needed, until
size t <= capacity t. The bindings are discarded in least-recently-used order.
val resize : int -> t -> unit
resize cap t changes the capacity of
cap, while leavind the bindings unchanged.
find k t is the
v bound to
k is not bound in
t, the result is
true, the binding
k -> v is promoted to most-recently-used. It defaults to
add k v t adds the binding
k -> v to
k is alread bound, the old binding is replaced. The binding
k -> v becomes most-recently-used.
trims the resulting map, ensuring it is not over capacity. It defaults to
Access to least-recently-used bindings
lru t is the least-recently-used binding in
t is empty.
val drop_lru : t -> unit
drop_lru t removes the binding
Traversal direction for operations that visit all bindings.
`Upmeans least-to-most recently used, or increasing relevance.
`Downmeans most-to-least recently used, or decreasing relevance.
fold f z t is
f k0 v0 (... (f kn vn z)).
~dir controls the order of folding. Defaults to
iter f t applies
f to all the bindings in
~dir controls the order of application. Defaults to
to_list t are the bindings in
~dir controls the order, defaults to
of_list kvs is a map with the bindings from
kvs. Its size and capacity are the total weight of its bindings.
With respect to duplicates and the recently-used order, it behaves as if the bindings were added sequentially in the list order.
val pp : ?pp_size:(Format.formatter -> (int * int) -> unit) -> ?sep:(Format.formatter -> unit -> unit) -> (Format.formatter -> (k * v) -> unit) -> Format.formatter -> t -> unit