-
Notifications
You must be signed in to change notification settings - Fork 34
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] Kahn's Algorithm #114
Comments
@bobluppes I completed the algorithm as per my knowledge, but when I am compiling the program, it says: please help me to fix this |
Hi, of course, welcome to Graaf! Regarding your issue, maybe you need to reload your cmake config? If the issue persists feel free to reach out in our discord. |
hey @bobluppes have raised a PR regarding this, but 1 check was not completed "Pull-Request-CI / format (pull_request) Failing after 32s" |
Hi @Dhandeep10, it seems like there are some formatting issues on the PR. You should be able to fix them locally by running I see there is already some feedback on the PR, let me know if you are still planning on taking this up :) |
Stale issue message |
Kahn's Algorithm
Kahn's algorithm is used for finding a topological order in a directed graph that has no cycles. The algorithm works by iteratively removing vertices that have an in-degree of zero and removing all outgoing edges from these vertices. The topological order is the sequence in which the nodes are removed.
We already have a function which computes the in-degree of a vertex in
graaflib/properties/vertex_properties.h
. It would be nice if we could reuse this.For more details, see the wikipedia entry.
Syntax
The algorithm should have the following syntax:
This should live in the
graaf::algorithm
namespace underinclude/graaflib/algorithm/topological_sorting/kahn.h
.Definition of Done
This issue is done when:
test/graaflib/algorithm/topological_sorting/kahn_test.cpp
docs/docs/algorithms
under the appropriate categoryREADME.md
The text was updated successfully, but these errors were encountered: