Module Custom_weak.Make_table
Parameters
module H : Stdlib.Hashtbl.HashedType
Signature
type 'a weak_t = 'a Stdlib.Weak.t
val weak_create : int -> 'a Stdlib.Weak.t
val emptybucket : H.t Stdlib.Weak.t
type t = {
mutable table : data weak_t array;
mutable hashes : int array array;
mutable limit : int;
mutable oversize : int;
mutable rover : int;
}
val get_index : t -> int -> int
val fold : (data -> 'a -> 'b) -> t -> 'c -> 'd
val iter : (data -> unit) -> t -> unit
val iter_weak : (data Stdlib.Weak.t -> int array -> int -> unit) -> t -> unit
val count_bucket : int -> 'a Stdlib.Weak.t -> int -> int
val test_shrink_bucket : t -> unit
val add_aux :
t ->
(data Stdlib.Weak.t -> int -> 'a option -> unit) ->
'a option ->
int ->
int ->
unit
val add : t -> data -> unit
val find_or : t -> H.t -> (int -> int -> data) -> data
val find : t -> H.t -> data
val find_opt : t -> H.t -> data option
val find_shadow : t -> H.t -> (data weak_t -> int -> 'a) -> 'b -> 'c
val remove : t -> H.t -> unit
val mem : t -> H.t -> bool
val find_all : t -> H.t -> data list
val find_all_by_hash : t -> int -> data list
val stats : t -> int * int * int * int * int * int