-
Notifications
You must be signed in to change notification settings - Fork 183
connected_components
dispatch too broad?
#368
Comments
|
If I recall correctly, the algorithm we have for connected components is repeated BFS until you find everybody with care taken in the implementation so that you touch every edge at most once. Thus the output on directed graphs is currently "vertex sets reachable from some lower numbered vertex by (directed) BFS." That is not labeling independent which makes it not so useful for graph theory purposes. We should probably dispatch @ivirshup what did you expect to get when you called I am inclined to say we should let it be a no such method error and have the docs point to both options. |
The benefit of that is explicitness. A user should know the difference and should know which is right for their use case. They alone have the knowledge to make the right choice. |
I think I expected the behavior of |
What have we decided to do? I'd like to get this resolved soon. :) |
I think we decided to make it a methoderror with a reference to weakly_connected_components. Since it currently returns nonsense, I am not concerned with breaking legacy code. Such code is already broken. All we need to do is change the connected_components method from SimpleGraph to Graph right? |
Question: should |
OK, so after talking with @jpfairbanks I've done the following:
Branch is |
connected_components
doesn't seem to have a meaningful return when called on a directed graph.Should it's dispatch be limited to undirected graphs where it has meaning? Or could the documentation change of 9873d0f be reverted to specify that's the type it works on?
edit: This is on julia 0.4.5 using LightGraphs master.
The text was updated successfully, but these errors were encountered: