Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Methods for running a DFS and BFS over all vertices #124

Open
dominikbraun opened this issue May 14, 2023 · 0 comments
Open

Methods for running a DFS and BFS over all vertices #124

dominikbraun opened this issue May 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dominikbraun
Copy link
Owner

The current DFS and BFS methods require a starting vertex as an argument and will only visit vertices that are reachable from these starting vertices. There should be separate methods that don't take such an argument and traverse all vertices in the graph, even if the graph is disconnected.

Maybe, appropriate names could be FullDFS, DFSAll, DFSFull or something like that. It would make more sense to use DFS as a name and rename the method with the starting vertex to DFSFrom, but I don't think I want to break the API at this point.

@dominikbraun dominikbraun added the enhancement New feature or request label May 14, 2023
williamfzc added a commit to williamfzc/graph that referenced this issue May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant