Up

module Gml

: sig

Parser and pretty-printer for GML file format.

#
type value =
# | Int of int
# | Float of float
# | String of string
# | List of value_list
#
type value_list = (string * value) list

Parser

#
module Parse : functor (B : Builder.S) -> functor (L : sig
#
val node : value_list -> B.G.V.label

How to build the node label out of the set of GML attributes. For example

node [ id 12 label "foo" ]

will call this function with ["id", Int 12; "label", String "foo"]

#
val edge : value_list -> B.G.E.label

How to build the edge label out of the set of GML attributes

end
) -> sig

Provide a parser for GML file format.

#
val parse : string -> B.G.t
end

Pretty-printer

#
module type G = sig

Signature for graph required by Print. Sub-signature of Sig.G.

#
module V : sig
#
type t
#
val hash : t -> int
#
val equal : t -> t -> bool
#
type label
#
val label : t -> label
end
#
module E : sig
#
type t
#
type label
#
val src : t -> V.t
#
val dst : t -> V.t
#
val label : t -> label
end
#
type t
#
val iter_vertex : (V.t -> unit) -> t -> unit
#
val iter_edges_e : (E.t -> unit) -> t -> unit
end
#
module Print : functor (G : G) -> functor (L : sig
#
val node : G.V.label -> value_list
#
val edge : G.E.label -> value_list
end
) -> sig

Provide a pretty-printer for GML file format.

#
val print : Format.formatter -> G.t -> unit
end
end