-
Notifications
You must be signed in to change notification settings - Fork 118
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
Return type of Kosaraju #251
Comments
I think is correct, the return type should be an |
Okay. I'd like to work on that, could you assign it to me? |
Sure! @dvd2000 I assigned it to you.
yes, it's correct |
I finally found some time to work on this and I have a few doubts about how to proceed:
I took a look at the approach used in the Boost graph library and they are using a map with vertices as keys and distinct labels for every strongly connected component as values. We can maybe do something similar here? But I think it would be important to keep consistency with the rest of the library. If you want I can open a PR for the Kosaraju's tests in the meantime (keeping the function itself as it is for the moment) |
Yes, in the meantime you can open a PR for Kosaraju's Tests. |
I'm writing some tests for Kosaraju's algorithm (these can potentially close #221), and this made me wonder about
kosaraju()
return type. Specifically, why does it return astd::vector<std::vector<Node<T>>>
?Wouldn't it be more appropriate to use
std::unordered_set
's or something similar?While this could maybe slightly lower the performance, I think it would have much more sense:
T_EdgeSet
type (maybe we can even introduce a typedef for a set of vertices)What do you think about that?
The text was updated successfully, but these errors were encountered: