We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
dfs_tree
1 parent ab8e72b commit afb8245Copy full SHA for afb8245
src/traversals/dfs.jl
@@ -121,10 +121,12 @@ function topological_sort_by_dfs end
121
end
122
123
"""
124
- dfs_tree(g, s)
+ dfs_tree(g, s[;dir=:out])
125
126
-Return an ordered vector of vertices representing a directed acyclic graph based on
127
-depth-first traversal of the graph `g` starting with source vertex `s`.
+Provide a depth-first traversal of the graph `g` starting with source vertex `s`,
+and return a directed acyclic graph of vertices in the order they were discovered.
128
+If `dir` is specified, use the corresponding edge direction (`:in` and `:out` are
129
+acceptable values).
130
131
dfs_tree(g::AbstractGraph, s::Integer; dir=:out) = tree(dfs_parents(g, s; dir=dir))
132
0 commit comments