Number.mli 1.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
(******************************************************************************)
(*                                                                            *)
(*                                    Fix                                     *)
(*                                                                            *)
(*                       François Pottier, Inria Paris                        *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the GNU Library General Public License version 2, with a         *)
(*  special exception on linking, as described in the file LICENSE.           *)
(*                                                                            *)
(******************************************************************************)

POTTIER Francois's avatar
POTTIER Francois committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
open Sigs

(* [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 Make
  (M : IMPERATIVE_MAPS)
  (G : GRAPH with type t = M.key)
     : NUMBERING with type t = G.t

(* [ForOrderedType] is a special case of [Make] where it suffices for
   the vertices of [G] to be ordered. *)

module ForOrderedType
29
  (T : OrderedType)
POTTIER Francois's avatar
POTTIER Francois committed
30 31 32 33 34 35 36
  (G : GRAPH with type t = T.t)
     : NUMBERING with type t = G.t

(* [ForHashedType] is a special case of [Make] where it suffices for
   the vertices of [G] to be hashed. *)

module ForHashedType
37
  (T : HashedType)
POTTIER Francois's avatar
POTTIER Francois committed
38 39 40 41 42 43 44 45 46 47 48
  (G : GRAPH with type t = T.t)
     : NUMBERING with type t = G.t

(* [ForType] is a special case of [Make] where the vertices of [G] can
   have arbitrary type. OCaml's built-in generic equality and hash
   functions are used. *)

module ForType
  (T : TYPE)
  (G : GRAPH with type t = T.t)
     : NUMBERING with type t = G.t