-
Notifications
You must be signed in to change notification settings - Fork 41
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
[ALGO] Topological Sorting (DFS-Based) #70
Comments
Hey @bobluppes ! Assign to me please. I wanna work on this after MST. |
Hi @Hromz, of course, would be happy to! Assigning this to you |
Hey @bobluppes, You have mentioned using existing DFS functionality. Right now, the solution I can propose is to store edges and process them after. It would be simple if we had a post-order callback. |
Correct, callback to the list. Alright, i'll add separate DFS implementation and change it in the future if needed. |
Thanks! For now we can keep it in the anonymous namespace of the topological sorting algorithm. We can see if it makes sense to expose it later |
Topological Sorting (DFS-Based)
A topological sort is a linear ordering of all vertices in a directed graph such that a vertex is only visited after its dependencies are visited. The goal of this issue is to implement topological sorting based on DFS.
The existing DFS functionality (depth_first_traverse) should be re-used, rather than implementing a new DFS traversal.
See the wikipedia entry for more details.
Syntax
The algorithm should have the following syntax:
This should live in the
graaf::algorithm
namespace underinclude/graaflib/algorithm/topological_sorting.h
.Definition of Done
This issue is done when:
test/graaflib/algorithm/topological_sorting_test.cpp
docs/docs/algorithms
under the appropriate categoryREADME.md
The text was updated successfully, but these errors were encountered: