Skip to content

Commit afb8245

Browse files
authored
Fix dfs_tree doc. (#367)
(mostly copied from current `bfs_tree` doc)
1 parent ab8e72b commit afb8245

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/traversals/dfs.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@ function topological_sort_by_dfs end
121121
end
122122

123123
"""
124-
dfs_tree(g, s)
124+
dfs_tree(g, s[;dir=:out])
125125
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`.
126+
Provide a depth-first traversal of the graph `g` starting with source vertex `s`,
127+
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).
128130
"""
129131
dfs_tree(g::AbstractGraph, s::Integer; dir=:out) = tree(dfs_parents(g, s; dir=dir))
130132

0 commit comments

Comments
 (0)