-
-
Notifications
You must be signed in to change notification settings - Fork 614
Updated methods concerning addition of edges in a matching covered graph #39763
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
Conversation
Documentation preview for this PR (built with commit 4f6904d; changes) is ready! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to feed a new list of edges in which you add (u, v, None)
or (u, v, label)
unless u == v
. This way you avoid the costly edges.remove(edge)
operation.
Also, I'm not sure why you add the edges to the graph if it already have all of them.
If the graph has already those edges, the it's a multiple-edge addition, this can be done directly without the check for whether the edge participates in some perfect matching or not. But if that's not the case, then we need to check if collectively the addition of all the edges, each of them participates in some perfect matching or not (the perfect matching may be different than the existing perfect matching depending on whether the edges in input introduce new vertices or not). |
It seems ok, but I'm not sure if you plan to do further changes in this PR. Let me know. |
Currently, there is no plan for any further changes in this PR; @dcoudert. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you. |
The objective of this issue is to update the methods concerning addition of edges in a matching covered graph.
More specifically, this PR aims to updated the following methods:
add_edges()
| Add edges from an iterable container.Please note that earlier this method used to add only one multiple edge, even though the container contains several of those.
Fixes #38216.
Note that this issue fixes a small part of the mentioned issue.
📝 Checklist
⌛ Dependencies
Nothing as of now.
cc: @dcoudert.