-
Notifications
You must be signed in to change notification settings - Fork 208
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
graph/labeled_graph: added remove_labeled_vertex #354
graph/labeled_graph: added remove_labeled_vertex #354
Conversation
I'm looking on my phone so I might be wrong, but it looks like it's running GCC 4.X in the CI, which I thought I removed. Are you up to date on develop? |
de651cb
to
fa3bf25
Compare
I took this patch from this ticket: https://svn.boost.org/trac/boost/ticket/9493
fa3bf25
to
52c216c
Compare
You're correct that my branch was quite far behind develop. I just rebased on the latest develop, pushed again, and the tests were still failing. It appears that the original patch I preserved from the original svn ticket/tracker only accounted for unique associative containers, and not a random access / vector container that the tests use. I did my best to update the patch and mimic the tag dispatch approach used by other methods to add support to |
Looks good. Could you please modify an existing unit test for labelled graphs to assert that the change is effective? I.e., change a unit test so that it fails without this change, then put it together with your changes so that it passes. PS. And if there is no existing unit test for labelled graphs... please write a really simple one. :) |
I've added a test for removing a labeled vertex, based on the original #167 post's code snippet. I tested that it fails without my patch, and passes with my patch. |
That's great. It does make me wonder about duplicate labels, though -- what happens? Is it even possible? If duplicate labels are possible in any circumstance, then we need a test to confirm what happens. |
Added a test that uses a multi associative container and adds two vertices with the same label, and then removes them one by one, asserting the graph vertex count at each stage. |
Fantastic. As soon as the CI is green, I'll merge it. |
Thanks so much for fixing a long-standing bug! |
I took this patch from this ticket:
https://svn.boost.org/trac/boost/ticket/9493
which no longer exists.
But I believe the original ticket issue was identical to #167 which this patch fixes.