sig
type ('a, 'b) t = ('a, 'b) Hashtbl.t
val create : ?random:bool -> int -> ('a, 'b) t
val clear : ('a, 'b) t -> unit
val reset : ('a, 'b) t -> unit
val copy : ('a, 'b) t -> ('a, 'b) t
val add : ('a, 'b) t -> 'a -> 'b -> unit
val find : ('a, 'b) t -> 'a -> 'b
val find_all : ('a, 'b) t -> 'a -> 'b list
val mem : ('a, 'b) t -> 'a -> bool
val remove : ('a, 'b) t -> 'a -> unit
val replace : ('a, 'b) t -> 'a -> 'b -> unit
val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit
val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit
val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
val length : ('a, 'b) t -> int
val randomize : unit -> unit
val is_randomized : unit -> bool
type statistics =
Hashtbl.statistics = {
num_bindings : int;
num_buckets : int;
max_bucket_length : int;
bucket_histogram : int array;
}
val stats : ('a, 'b) t -> statistics
module type HashedType =
sig type t val equal : t -> t -> bool val hash : t -> int end
module type S =
sig
type key
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
end
module Make :
functor (H : Hashtbl.HashedType) ->
sig
type key = H.t
type 'a t = 'a Hashtbl.Make(H).t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
end
module type SeededHashedType =
sig type t val equal : t -> t -> bool val hash : int -> t -> int end
module type SeededS =
sig
type key
type 'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
end
module MakeSeeded :
functor (H : SeededHashedType) ->
sig
type key = H.t
type 'a t
val create : ?random:bool -> int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> statistics
end
val hash : 'a -> int
val seeded_hash : int -> 'a -> int
val hash_param : int -> int -> 'a -> int
val seeded_hash_param : int -> int -> int -> 'a -> int
val get : ('a, 'b) Hashtbl.t -> 'a -> 'b option
val get_or : ('a, 'b) Hashtbl.t -> 'a -> default:'b -> 'b
val keys : ('a, 'b) Hashtbl.t -> 'a CCHashtbl.sequence
val values : ('a, 'b) Hashtbl.t -> 'b CCHashtbl.sequence
val keys_list : ('a, 'b) Hashtbl.t -> 'a list
val values_list : ('a, 'b) Hashtbl.t -> 'b list
val map_list : ('a -> 'b -> 'c) -> ('a, 'b) Hashtbl.t -> 'c list
val incr : ?by:int -> ('a, int) Hashtbl.t -> 'a -> unit
val decr : ?by:int -> ('a, int) Hashtbl.t -> 'a -> unit
val to_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) CCHashtbl.sequence
val add_list : ('a, 'b list) Hashtbl.t -> 'a -> 'b -> unit
val add_seq : ('a, 'b) Hashtbl.t -> ('a * 'b) CCHashtbl.sequence -> unit
val of_seq : ('a * 'b) CCHashtbl.sequence -> ('a, 'b) Hashtbl.t
val add_seq_count : ('a, int) Hashtbl.t -> 'a CCHashtbl.sequence -> unit
val of_seq_count : 'a CCHashtbl.sequence -> ('a, int) Hashtbl.t
val to_list : ('a, 'b) Hashtbl.t -> ('a * 'b) list
val of_list : ('a * 'b) list -> ('a, 'b) Hashtbl.t
val update :
('a, 'b) Hashtbl.t -> f:('a -> 'b option -> 'b option) -> k:'a -> unit
val get_or_add : ('a, 'b) Hashtbl.t -> f:('a -> 'b) -> k:'a -> 'b
val print :
'a CCHashtbl.printer ->
'b CCHashtbl.printer -> ('a, 'b) Hashtbl.t CCHashtbl.printer
module type S' = CCHashtbl.S
module Make' = CCHashtbl.Make
end