Module GraphNumbering.Make

Make(M)(G) produces a numbering of the graph G, or more precisely, of the subset of the vertices of G that are reachable from the roots. The type of the vertices must be equipped with an implementation of imperative maps.


module M : sig ... end
module G : sig ... end


type t = G.t

The type t of values of interest.

val n : int

n is the number of values of type t that have been encoded. The functions encode and decode represent an isomorphism between this subset of t and the interval [0..n).

val encode : t -> int

encode maps a value of type t to an integer code in the interval [0..n).

val decode : int -> t

decode maps an integer code in the interval [0..n) back to a value of type t.