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
Python max flow method #9350
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Updated, and now needs review :-) |
This comment has been minimized.
This comment has been minimized.
comment:3
This applies okay to 4.5.2.a1 and seems to pass all tests, except for some unrelated failures. However, there are no examples in edge_cut with vertices=True, eg
Why is this? |
comment:4
What do you think of line 3652 of the generic_graph.py file ?
Nathann |
comment:5
Replying to @nathanncohen:
The value isn't returned, so the potential user cannot see examples of how the output changes for different choices of the input. I'm just wondering if there was a good reason for omitting the edges in the output. An example with value_only=False would be equally nice. Finally, to be extremely picky, the description
should probably read
Does this seem reasonable? |
Attachment: trac_9350.patch.gz |
comment:6
It does ! I just updated the patch with you example and the corrected docstring There was, indeed, a reason for never showing directly the output of all these methods : it formerly used Linear Programming, and the results of LP, eve though correct, can vary depending on the time of the day and the solver used. So showing it is asking for trouble, though one can perfectly check some relations... But this Python implementation being deterministic, it's fine now ! Nathann |
comment:7
Replying to @nathanncohen:
Excellent. Passed tested for me (except for unrelated doctest failures on a mac 10.6.4). Thanks Nathann!! |
comment:8
I also tested this, and it looks OK. Dima |
comment:9
Thanksssss ! :-) |
Author: Nathann Cohen |
Reviewer: Dmitrii Pasechnik, David Joyner |
comment:11
Please remember to fill in the "Author(s)" and "Reviewer(s)" fields. |
Merged: sage-4.6.alpha1 |
Implementation of a max-flow algorithm which does not use Linear Programming. A tad faster than the current LP implementation.
This ticket also updates several other methods which formerly used flows (or could be made to), so that they may use the speedup !
I expected a much better speedup for gomory_hu, by the way.... It's odd, it sounds like the bottleneck is somewhere else... O_o
This patch is dedicated to anybody who ever refused one of my patches for lack of doctests. I wouldn't have noticed half of the bugs in this patch without the help of those doctests in the functions that use flow... I won't ever complain anymore because of that ! :-D
Nathann
Component: graph theory
Author: Nathann Cohen
Reviewer: Dmitrii Pasechnik, David Joyner
Merged: sage-4.6.alpha1
Issue created by migration from https://trac.sagemath.org/ticket/9350
The text was updated successfully, but these errors were encountered: