Module DHashhe

module DHashhe: sig .. end
Two-way hashtable between two data types

type ('a, 'b) t = {
   xy :('a, 'b) Hashhe.t;
   yx :('b, 'a) Hashhe.t;
}
The type of two-way hashtables, meant to be abstract
val hashx : ('a, 'b) t -> ('a, 'b) Hashhe.t
val hashy : ('a, 'b) t -> ('b, 'a) Hashhe.t
Return the correspondance hashtable resp. from x to y and from y to x. Never modify it !!!
val clear : ('a, 'b) t -> unit
Clear a table
val create : int -> ('a, 'b) t
Create a new table, with the specified initial size
val add : ('a, 'b) t -> 'a -> 'b -> unit
Add a new binding to the table.
val y_of_x : ('a, 'b) t -> 'a -> 'b
Association.
val x_of_y : ('a, 'b) t -> 'b -> 'a
Inverse association.
val removex : ('a, 'b) t -> 'a -> unit
Remove a binding defined by its first element.
val removey : ('a, 'b) t -> 'b -> unit
Remove a binding defined by its second element.
val memx : ('a, 'b) t -> 'a -> bool
Is the object registered ?
val memy : ('a, 'b) t -> 'b -> bool
Is the object registered ?
val iter : ('a, 'b) t -> ('a -> 'b -> unit) -> unit
Iterate on bindings.
val fold : ('a, 'b) t -> 'c -> ('a -> 'b -> 'c -> 'c) -> 'c
Iterate on bindings and accumulating a result.
val cardinal : ('a, 'b) t -> int
Return the number of bindings.
val print : ?first:(unit, Format.formatter, unit) Pervasives.format ->
?sep:(unit, Format.formatter, unit) Pervasives.format ->
?last:(unit, Format.formatter, unit) Pervasives.format ->
?firstbind:(unit, Format.formatter, unit) Pervasives.format ->
?sepbind:(unit, Format.formatter, unit) Pervasives.format ->
?lastbind:(unit, Format.formatter, unit) Pervasives.format ->
(Format.formatter -> 'a -> unit) ->
(Format.formatter -> 'b -> unit) ->
Format.formatter -> ('a, 'b) t -> unit
Print the set of bindings.
module type Param = sig .. end
Input signature of the functor DHashhe.Make.
module type S = sig .. end
Output signature of the functor DHashhe.Make.
module Make: 
functor (P : Param) -> S with module HashX = P.HashX and module HashY = P.HashY
Functor building an implementation of the DHashtbl structure given two hashtables