Module Mlpost__Hashcons
val create : int -> 'a t
create n
creates an empty table of initial sizen
. The table will grow as needed.
val clear : 'a t -> unit
Removes all elements from the table.
val hashcons : 'a t -> 'a -> 'a hash_consed
hashcons t n
hash-cons the valuen
using tablet
i.e. returns any existing value int
equal ton
, if any; otherwise, allocates a new one hash-consed value of noden
and returns it. As a consequence the returned value is physically equal to any equal value already hash-consed using tablet
.
val iter : ('a hash_consed -> unit) -> 'a t -> unit
iter f t
iteratesf
over all elements oft
.
val stats : 'a t -> int * int * int * int * int * int
Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.
module type HashedType = sig ... end
module type S = sig ... end