Module FGraph


module FGraph: sig .. end
Directed graphs, functional API, with two-way information maintained,


type ('a, 'b) node = {
   succ : 'a Sette.t;
   pred : 'a Sette.t;
   attrvertex : 'b;
}
type ('a, 'b, 'c, 'd) graph = {
   nodes : ('a, ('a, 'b) node) Mappe.t;
   arcs : ('a * 'a, 'c) Mappe.t;
   info : 'd;
}

Polymorphic version


type ('a, 'b, 'c, 'd) t 
val info : ('a, 'b, 'c, 'd) t -> 'd
val set_info : ('a, 'b, 'c, 'd) t -> 'd -> ('a, 'b, 'c, 'd) t
val succ : ('a, 'b, 'c, 'd) t -> 'a -> 'a Sette.t
val pred : ('a, 'b, 'c, 'd) t -> 'a -> 'a Sette.t
val attrvertex : ('a, 'b, 'c, 'd) t -> 'a -> 'b
val attredge : ('a, 'b, 'c, 'd) t -> 'a * 'a -> 'c
val empty : 'a -> ('b, 'c, 'd, 'a) t
val size_vertex : ('a, 'b, 'c, 'd) t -> int
val size_edge : ('a, 'b, 'c, 'd) t -> int
val size : ('a, 'b, 'c, 'd) t -> int * int
val is_empty : ('a, 'b, 'c, 'd) t -> bool
val is_vertex : ('a, 'b, 'c, 'd) t -> 'a -> bool
val is_edge : ('a, 'b, 'c, 'd) t -> 'a * 'a -> bool
val vertices : ('a, 'b, 'c, 'd) t -> 'a Sette.t
val edges : ('a, 'b, 'c, 'd) t -> ('a * 'a) Sette.t
val map_vertex : ('a, 'b, 'c, 'd) t ->
('a -> 'b -> pred:'a Sette.t -> succ:'a Sette.t -> 'e) ->
('a, 'e, 'c, 'd) t
val map_edge : ('a, 'b, 'c, 'd) t ->
('a * 'a -> 'c -> 'e) -> ('a, 'b, 'e, 'd) t
val map_info : ('a, 'b, 'c, 'd) t -> ('d -> 'e) -> ('a, 'b, 'c, 'e) t
val map : ('a, 'b, 'c, 'd) t ->
('a -> 'b -> pred:'a Sette.t -> succ:'a Sette.t -> 'e) ->
('a * 'a -> 'c -> 'f) -> ('d -> 'g) -> ('a, 'e, 'f, 'g) t
val transpose : ('a, 'b, 'c, 'd) t ->
('a -> 'b -> pred:'a Sette.t -> succ:'a Sette.t -> 'e) ->
('a * 'a -> 'c -> 'f) -> ('d -> 'g) -> ('a, 'e, 'f, 'g) t
val iter_vertex : ('a, 'b, 'c, 'd) t ->
('a -> 'b -> pred:'a Sette.t -> succ:'a Sette.t -> unit) -> unit
val iter_edge : ('a, 'b, 'c, 'd) t -> ('a * 'a -> 'c -> unit) -> unit
val fold_vertex : ('a, 'b, 'c, 'd) t ->
'e -> ('a -> 'b -> pred:'a Sette.t -> succ:'a Sette.t -> 'e -> 'e) -> 'e
val fold_edge : ('a, 'b, 'c, 'd) t -> 'e -> ('a * 'a -> 'c -> 'e -> 'e) -> 'e
val add_edge : ('a, 'b, 'c, 'd) t -> 'a * 'a -> 'c -> ('a, 'b, 'c, 'd) t
val remove_edge : ('a, 'b, 'c, 'd) t -> 'a * 'a -> ('a, 'b, 'c, 'd) t
val add_vertex : ('a, 'b, 'c, 'd) t -> 'a -> 'b -> ('a, 'b, 'c, 'd) t
val remove_vertex : ('a, 'b, 'c, 'd) t -> 'a -> ('a, 'b, 'c, 'd) t
val topological_sort : ('a, 'b, 'c, 'd) t -> 'a -> 'a list
val topological_sort_multi : 'a -> ('a, 'b, 'c, 'd) t -> 'a Sette.t -> 'a list
val reachable : ('a, 'b, 'c, 'd) t -> 'a -> 'a Sette.t
val reachable_multi : 'a -> ('a, 'b, 'c, 'd) t -> 'a Sette.t -> 'a Sette.t
val coreachable : ('a, 'b, 'c, 'd) t -> 'a -> 'a Sette.t
val coreachable_multi : 'a -> ('a, 'b, 'c, 'd) t -> 'a Sette.t -> 'a Sette.t
val cfc : ('a, 'b, 'c, 'd) t -> 'a -> 'a list list
val cfc_multi : 'a -> ('a, 'b, 'c, 'd) t -> 'a Sette.t -> 'a list list
val scfc : ('a, 'b, 'c, 'd) t -> 'a -> 'a Ilist.t
val scfc_multi : 'a -> ('a, 'b, 'c, 'd) t -> 'a Sette.t -> 'a Ilist.t
val min : ('a, 'b, 'c, 'd) t -> 'a Sette.t
val max : ('a, 'b, 'c, 'd) t -> 'a Sette.t
val print : (Format.formatter -> 'a -> unit) ->
(Format.formatter -> 'b -> unit) ->
(Format.formatter -> 'c -> unit) ->
(Format.formatter -> 'd -> unit) ->
Format.formatter -> ('a, 'b, 'c, 'd) t -> unit
val print_dot : ?titlestyle:string ->
?vertexstyle:string ->
?edgestyle:string ->
?title:string ->
(Format.formatter -> 'a -> unit) ->
(Format.formatter -> 'a -> 'b -> unit) ->
(Format.formatter -> 'a * 'a -> 'c -> unit) ->
Format.formatter -> ('a, 'b, 'c, 'd) t -> unit
val repr : ('a, 'b, 'c, 'd) t -> ('a, 'b, 'c, 'd) graph
val obj : ('a, 'b, 'c, 'd) graph -> ('a, 'b, 'c, 'd) t

Functor version


module type T = sig .. end
module type S = sig .. end
module Make: 
functor (T : T) -> S with type vertex=T.MapV.key and module SetV=T.MapV.Setkey and module SetE=T.MapE.Setkey and module MapV=T.MapV and module MapE=T.MapE