-
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
fix mincut() #325
fix mincut() #325
Conversation
I removed the weird computation of |
saves another 20% runtime
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 97.26% 97.28% +0.02%
==========================================
Files 115 115
Lines 6795 6789 -6
==========================================
- Hits 6609 6605 -4
+ Misses 186 184 -2 ☔ View full report in Codecov by Sentry. |
Thanks for this contribution! I will need a bit of time to review it but I fully intend to |
Feel free to ping me if I take too long |
Sure let me know if you have any questions. |
Oh well, you are right, the computation of cutweight inside the cut of the phase is unneeded. Thus I think we can continue with this PR, I will close mine.
This is only true at the last step of the phase. during the phase, it is equal to |
If nobody disagree, I will merge, there is nothing controversial in these changes |
To my understanding
adj_cost
stores the cut weight between the last two vertices, s and t.If that is lower then the current best cut it becomes the new best.
I do not really understand the
cutweight
computation inside the mincut phase. (It reminds me more of a flow computation) but also didn't think hard enough about the new intermediate pruning.Anyways, with this change I get the correct cut for the AoC graph (c.f. #324).
I did not test this any further, so please someone knowledgable look into it before merge