-
Notifications
You must be signed in to change notification settings - Fork 18
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
add_edge!(g, u, v) deletes existing edges if called twice with the same arguments #70
Comments
Thanks for the issue! It seems like a problem indeed, do you want to open a PR? |
I can do that 😄 Do you think removing |
I think the only reason the |
I discovered that too, and will add a fix to a PR very soon. |
add_edge!(g, u, v)
from here, when called with the sameu
,v
twice, adds the edge the first time, deletes it the second time (and does not add it in subsequent calls), since the length ofg.graph
does not change.Example
Workaround
Proposed Fix
Remove this call of
delete!
and onlyreturn false
. If that does not lead to the expected behavior, add checks as described in the workaround insideadd_edge!
, s.t. users don't have to do that.The text was updated successfully, but these errors were encountered: