File: ograph_simple.mli

package info (click to toggle)
coccinelle 1.0.8.deb-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 26,148 kB
  • sloc: ml: 136,392; ansic: 23,594; sh: 2,189; makefile: 2,157; perl: 1,576; lisp: 840; python: 823; awk: 70; csh: 12
file content (58 lines) | stat: -rw-r--r-- 1,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
(* essentially a convenient way to access a hash and its reverse hash *)

module type S =
  sig
    type key
    type node
    type edge
    type keys (* set of keys *)
    type edges (* sets of (key,edge) pairs *)
    type keynodemap
    type keyedgesmap
    class ograph_mutable :
    object ('o)
      method add_node : key -> node -> unit
      method del_node : key -> unit
      method replace_node : key -> node -> unit


      method add_arc : (key * key) -> edge -> unit
      method del_arc : (key * key) -> edge -> unit

      method nodes : keynodemap

      method successors : key -> edges
      method predecessors : key -> edges
      method allsuccessors : keyedgesmap


      method del_leaf_node_and_its_edges : key -> unit

      method ancestors : key -> keys
      method leaf_nodes : unit -> keys

    end

    val print_ograph_generic:
      str_of_key:(key -> string) ->
      str_of_node:(key -> node -> string) ->
      Common.filename ->
      ograph_mutable ->
      unit
  end

module Make
  (Key : Set.OrderedType)
  (KeySet : Set.S with type elt = Key.t)
  (KeyMap : Map.S with type key = Key.t)
  (Node : Set.OrderedType)
  (Edge : Set.OrderedType)
  (KeyEdgePair : Set.OrderedType with type t = Key.t * Edge.t)
  (KeyEdgeSet : Set.S with type elt = KeyEdgePair.t) : S with
  type key = Key.t and
  type node = Node.t and
  type edge = Edge.t and
  type keys = KeySet.t and
  type edges = KeyEdgeSet.t and
  type keynodemap = Node.t KeyMap.t and
  type keyedgesmap = KeyEdgeSet.t KeyMap.t