|
|
@ -99,6 +99,7 @@ The opaque type corresponding to the predicate @racketlink[g:matrix-graph? "matr |
|
|
|
@defproc[(graph-union! [g Graph] [other Graph]) Void]{} |
|
|
|
|
|
|
|
@subsection{Graph Constructors} |
|
|
|
|
|
|
|
@defproc[(unweighted-graph? [g Graph]) Boolean]{} |
|
|
|
@defproc[(unweighted-graph/undirected [edges (Listof (List Any Any))]) Graph]{} |
|
|
|
@defproc[(unweighted-graph/directed [edges (Listof (List Any Any))]) Graph]{} |
|
|
@ -167,12 +168,14 @@ Graph properties are not supported. |
|
|
|
@defproc[(scc [g Graph]) (Listof (Listof Any))]{} |
|
|
|
|
|
|
|
@subsection{Spanning Trees} |
|
|
|
|
|
|
|
@defproc[(min-st-kruskal [g Graph]) (Listof (List Any Any))]{} |
|
|
|
@defproc[(max-st-kruskal [g Graph]) (Listof (List Any Any))]{} |
|
|
|
@defproc[(min-st-prim [g Graph] [source Any]) (Listof (List Any Any))]{} |
|
|
|
@defproc[(max-st-prim [g Graph] [source Any]) (Listof (List Any Any))]{} |
|
|
|
|
|
|
|
@subsection{Single-source Shortest Paths} |
|
|
|
|
|
|
|
@defproc[(bellman-ford [g Graph] [source Any]) (Values (Mutable-HashTable Any Number) |
|
|
|
(Mutable-HashTable Any Any))]{} |
|
|
|
@defproc[(dijkstra [g Graph] [source Any]) (Values (Mutable-HashTable Any Number) |
|
|
@ -182,11 +185,13 @@ Graph properties are not supported. |
|
|
|
(Mutable-HashTable Any Any))]{} |
|
|
|
|
|
|
|
@subsection{All-pairs Shortest Paths} |
|
|
|
|
|
|
|
@defproc[(floyd-warshall [g Graph]) (Mutable-HashTable (List Any Any) Number)]{} |
|
|
|
@defproc[(transitive-closure [g Graph]) (Mutable-HashTable (List Any Any) Boolean)]{} |
|
|
|
@defproc[(johnson [g Graph]) (Mutable-HashTable (List Any Any) Number)]{} |
|
|
|
|
|
|
|
@subsection{Coloring} |
|
|
|
|
|
|
|
@defproc[(coloring [g Graph] |
|
|
|
[num-colors Natural] |
|
|
|
[#:order order (-> (Listof Any) (Listof Any)) (λ (x) x)]) |
|
|
@ -199,6 +204,7 @@ Graph properties are not supported. |
|
|
|
@defproc[(valid-coloring? [g Graph] [coloring (HashTable Any Number)]) Boolean]{} |
|
|
|
|
|
|
|
@subsection{Maximum Flow} |
|
|
|
|
|
|
|
@defproc[(maxflow [g Graph] [source Any] [sink Any]) (HashTable (List Any Any) Number)]{} |
|
|
|
@defproc[(bipartite? [g Graph]) (U (List (Listof Any) (Listof Any)) False)]{} |
|
|
|
@defproc[(maximum-bipartite-matching [g Graph]) (Listof (List Any Any))] |
|
|
|