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 data = H.t
type t = {
  1. mutable table : data weak_t array;
  2. mutable hashes : int array array;
  3. mutable limit : int;
  4. mutable oversize : int;
  5. mutable rover : int;
}
val get_index : t -> int -> int
val limit : int
val over_limit : int
val create : int -> t
val clear : t -> unit
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 count : t -> int
val next_sz : int -> int
val prev_sz : int -> int
val test_shrink_bucket : t -> unit
val resize : 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 merge : t -> 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