From 843bd5a8cb04bbb87e7612d0f1ac2f5f30a07edb Mon Sep 17 00:00:00 2001 From: Sergiu Ivanov Date: Sun, 2 Jan 2022 21:57:25 +0100 Subject: [PATCH] manual: Add DFS-related functions. --- manual.scrbl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/manual.scrbl b/manual.scrbl index 00a17e0..04505d6 100644 --- a/manual.scrbl +++ b/manual.scrbl @@ -143,6 +143,28 @@ Graph properties are not supported. ) Any]{} @defproc[(fewest-vertices-path [g Graph] [source Any] [target Any]) (U (Listof Any) False)]{} +@defproc[(dfs [g Graph]) (Values (Mutable-HashTable Any Number) + (Mutable-HashTable Any Any) + (Mutable-HashTable Any Number))]{} +@defproc[(dfs/generalized [g Graph] + [#:order order (-> (Listof Any) (Listof Any)) (λ (x) x)] + [#:break break? (-> Graph Any Any Any Boolean) (λ (g from to acc) #f)] + [#:init init (U (-> Graph Void) Void) void] + [#:inner-init inner-init (-> Any Any) (λ (acc) acc)] + [#:visit? custom-visit?-fn (U (-> Graph Any Any Boolean) False) #f] + [#:prologue prologue (-> Graph Any Any Any Any) (λ (G u v acc) acc)] + [#:epilogue epilogue (-> Graph Any Any Any Any) (λ (G u v acc) acc)] + [#:process-unvisited? process-unvisited? (-> Graph Any Any Boolean) (λ (G u v) #f)] + [#:process-unvisited process-unvisited (-> Graph Any Any Any Any) (λ (G u v acc) acc)] + [#:combine combine (-> Any Any Any) (λ (x acc) x)] + [#:return finish (-> Graph Any Any) (λ (G acc) acc)] + ) Any]{} +@defproc[(dag? [g Graph]) Boolean]{} +@defproc[(tsort [g Graph]) (Listof Any)]{} +@defproc[(cc [g Graph]) (Listof (Listof Any))]{} +@defproc[(cc/bfs [g Graph]) (Listof (Listof Any))]{} +@defproc[(scc [g Graph]) (Listof (Listof Any))]{} + @section{License} Like the generic graph library, this library is licensed under the Apache