Skip to content

Commit

Permalink
Create graphlib properly
Browse files Browse the repository at this point in the history
  • Loading branch information
giltho committed Apr 29, 2020
1 parent 2f631f5 commit e54dde2
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.cm*
*.annot
*.o
.merlin
/.depend
/META
/Makefile
Expand Down
8 changes: 0 additions & 8 deletions src/.merlin

This file was deleted.

4 changes: 2 additions & 2 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(name graph)
(public_name ocamlgraph.graph)
(name graphlib)
(public_name ocamlgraph.graphlib)
(libraries stdlib-shims lib)
(flags -open Lib)
(modules_without_implementation dot_ast sig sig_pack))
Expand Down
40 changes: 40 additions & 0 deletions src/graphlib.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module Sig = Sig
module Sig_pack = Sig_pack
module Dot_ast = Dot_ast
module Util = Util
module Persistent = Persistent
module Imperative = Imperative
module Delaunay = Delaunay
module Builder = Builder
module Classic = Classic
module Rand = Rand
module Oper = Oper
module Components = Components
module Path = Path
module Nonnegative = Nonnegative
module Traverse = Traverse
module Coloring = Coloring
module Topological = Topological
module Kruskal = Kruskal
module Flow = Flow
module Prim = Prim
module Dominator = Dominator
module Graphviz = Graphviz
module Gml = Gml
module Dot = Dot
module Pack = Pack
module Gmap = Gmap
module Minsep = Minsep
module Cliquetree = Cliquetree
module Mcs_m = Mcs_m
module Md = Md
module Strat = Strat
module Fixpoint = Fixpoint
module Leaderlist = Leaderlist
module Contraction = Contraction
module Graphml = Graphml
module Merge = Merge
module Mincut = Mincut
module Clique = Clique
module WeakTopological = WeakTopological
module ChaoticIteration = ChaoticIteration
8 changes: 4 additions & 4 deletions src/imperative.ml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ module Graph = struct
module Concrete(V: COMPARABLE) = struct

module G = struct include Digraph.Concrete(V) type return = unit end
include Graph(G)
include Blocks.Graph(G)

(* Redefine the [add_edge] and [remove_edge] operations *)

Expand Down Expand Up @@ -261,7 +261,7 @@ module Graph = struct
include Digraph.ConcreteLabeled(V)(Edge)
type return = unit
end
include Graph(G)
include Blocks.Graph(G)

(* Redefine the [add_edge] and [remove_edge] operations *)

Expand Down Expand Up @@ -289,7 +289,7 @@ module Graph = struct
module Abstract(V: sig type t end) = struct

module G = struct include Digraph.Abstract(V) type return = unit end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
module Mark = G.Mark
Expand Down Expand Up @@ -318,7 +318,7 @@ module Graph = struct
include Digraph.AbstractLabeled(V)(Edge)
type return = unit
end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
module Mark = G.Mark
Expand Down
8 changes: 4 additions & 4 deletions src/persistent.ml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module Graph = struct
module Concrete(V: COMPARABLE) = struct

module G = struct include Digraph.Concrete(V) type return = t end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
let empty = G.empty
Expand Down Expand Up @@ -238,7 +238,7 @@ module Graph = struct
include Digraph.ConcreteLabeled(V)(Edge)
type return = t
end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
let empty = G.empty
Expand Down Expand Up @@ -267,7 +267,7 @@ module Graph = struct
module Abstract(V: sig type t end) = struct

module G = struct include Digraph.Abstract(V) type return = t end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
let empty = G.empty
Expand Down Expand Up @@ -296,7 +296,7 @@ module Graph = struct
include Digraph.AbstractLabeled(V)(Edge)
type return = t
end
include Graph(G)
include Blocks.Graph(G)

(* Export some definitions of [G] *)
let empty = G.empty
Expand Down

0 comments on commit e54dde2

Please sign in to comment.