Module Ext.Hashtbl

module Hashtbl: sig .. end
Standard Ocaml Hashtbl module with extended functionality.


Extended functionality

val keys_to_list : ('a, 'b) Hashtbl.t -> 'a list
keys_to_list h returns a list of all keys in hashtable h.
val dfind : ('a, 'b) Hashtbl.t -> 'a -> 'b -> 'b
dfind h key default returns the item with key key if the key is present in h, and returns default otherwise.

Functions and modules from the original Hashtbl module

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 fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
val length : ('a, 'b) t -> int
val randomize : unit -> unit
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 .. end
module type S = sig .. end
module Make: 
functor (H : HashedType) -> sig .. end
module type SeededHashedType = sig .. end
module type SeededS = sig .. end
module MakeSeeded: 
functor (H : SeededHashedType) -> sig .. 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