sig
type pos = float * float
type bounding_box = XDot.pos * XDot.pos
type node_layout = {
n_name : string;
n_pos : XDot.pos;
n_bbox : XDot.bounding_box;
n_draw : XDotDraw.operation list;
n_ldraw : XDotDraw.operation list;
}
type cluster_layout = {
c_pos : XDot.pos;
c_bbox : XDot.bounding_box;
c_draw : XDotDraw.operation list;
c_ldraw : XDotDraw.operation list;
}
type edge_layout = {
e_draw : XDotDraw.operation list;
e_ldraw : XDotDraw.operation list;
e_hdraw : XDotDraw.operation list;
e_tdraw : XDotDraw.operation list;
e_hldraw : XDotDraw.operation list;
e_tldraw : XDotDraw.operation list;
}
val mk_node_layout :
name:string ->
pos:XDot.pos ->
bbox:XDot.bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> XDot.node_layout
val mk_cluster_layout :
pos:XDot.pos ->
bbox:XDot.bounding_box ->
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list -> XDot.cluster_layout
val mk_edge_layout :
draw:XDotDraw.operation list ->
ldraw:XDotDraw.operation list ->
hdraw:XDotDraw.operation list ->
tdraw:XDotDraw.operation list ->
hldraw:XDotDraw.operation list ->
tldraw:XDotDraw.operation list -> XDot.edge_layout
exception ParseError of string
module Make :
functor (G : Graph.Graphviz.GraphWithDotAttrs) ->
sig
module HV :
sig
type key = G.V.t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_opt : 'a t -> key -> 'a option
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_keys : 'a t -> key Seq.t
val to_seq_values : 'a t -> 'a Seq.t
val add_seq : 'a t -> (key * 'a) Seq.t -> unit
val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
val of_seq : (key * 'a) Seq.t -> 'a t
end
module HE :
sig
type key = G.E.t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) ->
'a t -> 'b t -> 'c t
val union :
(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val min_binding_opt : 'a t -> (key * 'a) option
val max_binding : 'a t -> key * 'a
val max_binding_opt : 'a t -> (key * 'a) option
val choose : 'a t -> key * 'a
val choose_opt : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val find_opt : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> key * 'a
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> key * 'a
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Seq.t -> 'a t
end
type graph_layout = {
vertex_layouts : XDot.node_layout XDot.Make.HV.t;
edge_layouts : XDot.edge_layout XDot.Make.HE.t;
cluster_layouts : (string, XDot.cluster_layout) Stdlib.Hashtbl.t;
bbox : XDot.bounding_box;
}
exception DotError of string
val layout_of_xdot :
xdot_file:string -> G.t -> XDot.Make.graph_layout
val layout_of_dot :
?cmd:string -> dot_file:string -> G.t -> XDot.Make.graph_layout
end
val bounding_box : float * float -> float -> float -> XDot.bounding_box
val read_bounding_box : string -> XDot.bounding_box
val read_node_layout :
Graph.Dot_ast.node_id -> Graph.Dot_ast.attr list -> XDot.node_layout
val read_edge_layout : Graph.Dot_ast.attr list -> XDot.edge_layout
val read_cluster_layout : Graph.Dot_ast.attr list -> XDot.cluster_layout
end