1 Depth First Search |
|
|
dfs-visitor |
Form | (dfs-visitor init start discover examine tree-edge back-edge forward-or-cross-edge finish |
Description | Create a depth-first search visitor. |
Parameters | init | This is invoked on every vertex of the graph before the start of the graph search. |
start | This is invoked on the source vertex once before the start of the search. |
discover | This is invoked when a vertex is encountered for the first time. |
examine | This is invoked on every out-edge of each vertex after it is discovered, and returns #f if the vertex should not be examined. |
tree-edge | This is invoked on each edge as it becomes a member of the edges that form the search tree. |
back-edge | This is invoked on the back edges in the graph. For an undirected graph there is some ambiguity between tree edges and back edges since the edge (u,v) and (v,u) are the same edge, but both the tree_edge() and back_edge() functions will be invoked. One way to resolve this ambiguity is to record the tree edges, and then disregard the back-edges that are already marked as tree edges. An easy way to record tree edges is to record predecessors at the tree_edge event point. |
forward-or-cross-edge | This is invoked on forward or cross edges in the graph. In an undirected graph this method is never called. |
finish | This is invoked on vertex u after finish_vertex has been called for all the vertices in the DFS-tree rooted at vertex u. If vertex u is a leaf in the DFS-tree, then the finish_vertex function is call on u after all the out-edges of u have been examined. |
|
null-dfs-visitor |
Form | (null-dfs-visitor) |
Description | Create a depth-first search visitor that does nothing. |
|
set-dfs-visitor-init! |
Form | (set-dfs-visitor-init! PROC) |
Description | Call (PROC graph vertex) on the init event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-start! |
Form | (set-dfs-visitor-start! PROC) |
Description | Call (PROC graph vertex) on the start event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-discover! |
Form | (set-dfs-visitor-discover! PROC) |
Description | Call (PROC graph vertex) on the discover event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-examine! |
Form | (set-dfs-visitor-examine! PROC) |
Description | Call (PROC graph vertex) on the examine event. If PROC returns #f, then don't examine the vertex. |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-tree-edge! |
Form | (set-dfs-visitor-tree-edge! PROC) |
Description | Call (PROC graph edge) on the tree-edge event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-back-edge! |
Form | (set-dfs-visitor-back-edge! PROC) |
Description | Call (PROC graph edge) on the back-edge event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-forward-or-cross-edge! |
Form | (set-dfs-visitor-forward-or-cross-edge! PROC) |
Description | Call (PROC graph edge) on the forward-or-cross-edge event |
See also | Depth First Search Visitor | dfs-visitor |
|
set-dfs-visitor-finish! |
Form | (set-dfs-visitor-finish! PROC) |
Description | Call (PROC graph vertex) on the finish event |
See also | Depth First Search Visitor | dfs-visitor |
|