-
Notifications
You must be signed in to change notification settings - Fork 93
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
is_cyclic
for undirected graphs
#34
Comments
My understanding was that for an undirected graph Maybe there should also be a generic |
Ah yes thanks, that's a more efficient route. Still, would be nice to have |
@samwycherley, Are you interested in finding an algorithm for this? If not I'll close since @mtfishman solved your direct problem. The non-backtracking part makes its a bit harder. |
When I have time, I'll try and work on it and put up a PR. Feel free to close in the meantime. |
Is someone working on this Issue? If not, I would like to implement it as a first issue. If we want to add a generic function |
@pgrepds feel free to contribute, it is a nice first issue to tackle! |
Because of this that say the behavior was intended, wouldn't it be a breaking change ? To clear the confusion, maybe we could deprecate this function , and have a |
It seems that #168 is ready to be merged to close this. |
closed by #168 |
Issue previously open at #1518 for LightGraphs.jl.
The
is_cyclic
function in LightGraphs.jl works well for directed graphs but for undirected graphs returnstrue
for any nonempty graph. The usual definition for undirected graphs is that cycles don't contain repeated links, so 1->2->1 is not considered a cycle (absent multiple edges.)Useful for me because I want a function that will test whether an (undirected) network is a tree and easiest way to check that is to confirm the graph is acyclic+connected
The text was updated successfully, but these errors were encountered: