sig
module type GMap =
sig
type key
type 'a t
val create : unit -> 'a Stog_graph.GMap.t
val get : 'a Stog_graph.GMap.t -> Stog_graph.GMap.key -> 'a
val set :
'a Stog_graph.GMap.t ->
Stog_graph.GMap.key -> 'a -> 'a Stog_graph.GMap.t
val remove :
'a Stog_graph.GMap.t -> Stog_graph.GMap.key -> 'a Stog_graph.GMap.t
val fold :
(Stog_graph.GMap.key -> 'a -> 'b -> 'b) ->
'a Stog_graph.GMap.t -> 'b -> 'b
val iter :
(Stog_graph.GMap.key -> 'a -> unit) -> 'a Stog_graph.GMap.t -> unit
end
module type S =
sig
type key
type edge_data
type t
val create : unit -> Stog_graph.S.t
val marshal : Stog_graph.S.t -> string
val unmarshal : string -> Stog_graph.S.t
val succ :
Stog_graph.S.t ->
Stog_graph.S.key -> (Stog_graph.S.key * Stog_graph.S.edge_data) list
val pred :
Stog_graph.S.t ->
Stog_graph.S.key -> (Stog_graph.S.key * Stog_graph.S.edge_data) list
val add :
Stog_graph.S.t ->
Stog_graph.S.key * Stog_graph.S.key * Stog_graph.S.edge_data ->
Stog_graph.S.t
val rem :
Stog_graph.S.t ->
Stog_graph.S.key * Stog_graph.S.key ->
(Stog_graph.S.edge_data -> bool) -> Stog_graph.S.t
val rem_all :
Stog_graph.S.t ->
Stog_graph.S.key * Stog_graph.S.key -> Stog_graph.S.t
val isolate : Stog_graph.S.t -> Stog_graph.S.key -> Stog_graph.S.t
val remove_node : Stog_graph.S.t -> Stog_graph.S.key -> Stog_graph.S.t
val pred_roots :
?ignore_deps:Stog_graph.S.edge_data list ->
Stog_graph.S.t -> Stog_graph.S.key list
val succ_roots : Stog_graph.S.t -> Stog_graph.S.key list
val recursive_succs :
Stog_graph.S.t ->
?pred:(Stog_graph.S.edge_data -> bool) ->
Stog_graph.S.key -> Stog_graph.S.key list
val recursive_preds :
Stog_graph.S.t ->
?pred:(Stog_graph.S.edge_data -> bool) ->
Stog_graph.S.key -> Stog_graph.S.key list
val reverse : Stog_graph.S.t -> Stog_graph.S.t
val fold_succ :
Stog_graph.S.t ->
(Stog_graph.S.key ->
(Stog_graph.S.key * Stog_graph.S.edge_data) list -> 'a -> 'a) ->
'a -> 'a
val fold_pred :
Stog_graph.S.t ->
(Stog_graph.S.key ->
(Stog_graph.S.key * Stog_graph.S.edge_data) list -> 'a -> 'a) ->
'a -> 'a
val iter_succ :
Stog_graph.S.t ->
(Stog_graph.S.key ->
(Stog_graph.S.key * Stog_graph.S.edge_data) list -> unit) ->
unit
val iter_pred :
Stog_graph.S.t ->
(Stog_graph.S.key ->
(Stog_graph.S.key * Stog_graph.S.edge_data) list -> unit) ->
unit
val dot_of_graph :
?f_edge:(Stog_graph.S.edge_data -> string * (string * string) list) ->
f_node:(Stog_graph.S.key -> string * string * (string * string) list) ->
Stog_graph.S.t -> string
val nodes_by_pred_order : Stog_graph.S.t -> Stog_graph.S.key list
val shortest_path :
Stog_graph.S.t ->
(Stog_graph.S.t ->
Stog_graph.S.key * Stog_graph.S.key ->
(float * Stog_graph.S.edge_data) option) ->
Stog_graph.S.key * Stog_graph.S.key ->
(Stog_graph.S.key * Stog_graph.S.edge_data * Stog_graph.S.key) list
end
module Make :
functor (M : GMap) ->
functor (Edge : Map.OrderedType) ->
sig
type key = M.key
type edge_data = Edge.t
type t
val create : unit -> t
val marshal : t -> string
val unmarshal : string -> t
val succ : t -> key -> (key * edge_data) list
val pred : t -> key -> (key * edge_data) list
val add : t -> key * key * edge_data -> t
val rem : t -> key * key -> (edge_data -> bool) -> t
val rem_all : t -> key * key -> t
val isolate : t -> key -> t
val remove_node : t -> key -> t
val pred_roots : ?ignore_deps:edge_data list -> t -> key list
val succ_roots : t -> key list
val recursive_succs :
t -> ?pred:(edge_data -> bool) -> key -> key list
val recursive_preds :
t -> ?pred:(edge_data -> bool) -> key -> key list
val reverse : t -> t
val fold_succ :
t -> (key -> (key * edge_data) list -> 'a -> 'a) -> 'a -> 'a
val fold_pred :
t -> (key -> (key * edge_data) list -> 'a -> 'a) -> 'a -> 'a
val iter_succ :
t -> (key -> (key * edge_data) list -> unit) -> unit
val iter_pred :
t -> (key -> (key * edge_data) list -> unit) -> unit
val dot_of_graph :
?f_edge:(edge_data -> string * (string * string) list) ->
f_node:(key -> string * string * (string * string) list) ->
t -> string
val nodes_by_pred_order : t -> key list
val shortest_path :
t ->
(t -> key * key -> (float * edge_data) option) ->
key * key -> (key * edge_data * key) list
end
module Make_with_map :
functor (P : Map.OrderedType) ->
functor (Edge : Map.OrderedType) ->
sig
type key = P.t
type edge_data = Edge.t
type t
val create : unit -> t
val marshal : t -> string
val unmarshal : string -> t
val succ : t -> key -> (key * edge_data) list
val pred : t -> key -> (key * edge_data) list
val add : t -> key * key * edge_data -> t
val rem : t -> key * key -> (edge_data -> bool) -> t
val rem_all : t -> key * key -> t
val isolate : t -> key -> t
val remove_node : t -> key -> t
val pred_roots : ?ignore_deps:edge_data list -> t -> key list
val succ_roots : t -> key list
val recursive_succs :
t -> ?pred:(edge_data -> bool) -> key -> key list
val recursive_preds :
t -> ?pred:(edge_data -> bool) -> key -> key list
val reverse : t -> t
val fold_succ :
t -> (key -> (key * edge_data) list -> 'a -> 'a) -> 'a -> 'a
val fold_pred :
t -> (key -> (key * edge_data) list -> 'a -> 'a) -> 'a -> 'a
val iter_succ :
t -> (key -> (key * edge_data) list -> unit) -> unit
val iter_pred :
t -> (key -> (key * edge_data) list -> unit) -> unit
val dot_of_graph :
?f_edge:(edge_data -> string * (string * string) list) ->
f_node:(key -> string * string * (string * string) list) ->
t -> string
val nodes_by_pred_order : t -> key list
val shortest_path :
t ->
(t -> key * key -> (float * edge_data) option) ->
key * key -> (key * edge_data * key) list
end
end