sig
module type Table =
sig
type t
type key
type value
val create : int -> Sig.Table.t
val set : Sig.Table.t -> Sig.Table.key -> Sig.Table.value -> unit
val get : Sig.Table.t -> Sig.Table.key -> Sig.Table.value
end
module type GraphAlgo =
sig
type t
type vertex
val n : Sig.GraphAlgo.t -> int
val iter_vertex :
(Sig.GraphAlgo.vertex -> unit) -> Sig.GraphAlgo.t -> unit
val iter_succ :
(Sig.GraphAlgo.vertex -> unit) ->
Sig.GraphAlgo.t -> Sig.GraphAlgo.vertex -> unit
module V :
sig
type t
type key = vertex
type value = vertex
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
module I :
sig
type t
type key = vertex
type value = int
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
val m : Sig.GraphAlgo.t -> int
val string_of_vertex :
Sig.GraphAlgo.t -> Sig.GraphAlgo.vertex -> string
end
module type Graph =
sig
type t
type vertex
val n : t -> int
val iter_vertex : (vertex -> unit) -> t -> unit
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
module V :
sig
type t
type key = vertex
type value = vertex
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
module I :
sig
type t
type key = vertex
type value = int
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
val m : t -> int
val string_of_vertex : t -> vertex -> string
val create : ?n:int -> ?m:int -> unit -> t
type node
val vertex : t -> Sig.Graph.node -> vertex
val node : t -> vertex -> Sig.Graph.node
val add_node : t -> Sig.Graph.node -> unit
val add_edge : t -> Sig.Graph.node -> Sig.Graph.node -> unit
val iter_edges :
(Sig.Graph.node -> Sig.Graph.node -> unit) -> t -> unit
end
module type LabeledGraph =
sig
type t
type vertex
val n : t -> int
val iter_vertex : (vertex -> unit) -> t -> unit
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
module V :
sig
type t
type key = vertex
type value = vertex
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
module I :
sig
type t
type key = vertex
type value = int
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
val m : t -> int
val string_of_vertex : t -> vertex -> string
val create : ?n:int -> ?m:int -> unit -> t
type node
val vertex : t -> node -> vertex
val node : t -> vertex -> node
val add_node : t -> node -> unit
type label
val add_edge : t -> node -> Sig.LabeledGraph.label -> node -> unit
val iter_labeled_succ :
(Sig.LabeledGraph.label -> vertex -> unit) -> t -> vertex -> unit
val iter_edges :
(node -> Sig.LabeledGraph.label -> node -> unit) -> t -> unit
end
module type Weight =
sig
type t
val zero : Sig.Weight.t
val infinity : Sig.Weight.t
val compare : Sig.Weight.t -> Sig.Weight.t -> int
val add : Sig.Weight.t -> Sig.Weight.t -> Sig.Weight.t
val to_string : Sig.Weight.t -> string
end
module type WeightedGraphAlgo =
sig
type t
type vertex
val n : t -> int
val iter_vertex : (vertex -> unit) -> t -> unit
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
module V :
sig
type t
type key = vertex
type value = vertex
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
module I :
sig
type t
type key = vertex
type value = int
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
val m : t -> int
val string_of_vertex : t -> vertex -> string
type label
val iter_labeled_succ :
(Sig.WeightedGraphAlgo.label -> vertex -> unit) ->
t -> vertex -> unit
module WT :
sig
type t
type key = vertex
type value = label
val create : int -> t
val set : t -> key -> value -> unit
val get : t -> key -> value
end
module W :
sig
type t = label
val zero : t
val infinity : t
val compare : t -> t -> int
val add : t -> t -> t
val to_string : t -> string
end
end
end