Opened 16 years ago
Closed 12 years ago
#177 closed task (done)
Port the Edmonds-Karp max. flow alg.
Reported by: | Alpar Juttner | Owned by: | Peter Kovacs |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.3 release |
Component: | core | Version: | hg main |
Keywords: | Cc: | Peter Kovacs | |
Revision id: |
Description (last modified by )
Attachments (4)
Change History (20)
comment:1 Changed 16 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 16 years ago by
Owner: | changed from Alpar Juttner to Peter Kovacs |
---|
comment:3 follow-up: 4 Changed 16 years ago by
Status: | new → assigned |
---|
comment:4 Changed 16 years ago by
comment:5 Changed 16 years ago by
Milestone: | LEMON 1.1 release → LEMON 1.2 release |
---|
comment:6 Changed 16 years ago by
Type: | enhancement → task |
---|
comment:7 Changed 15 years ago by
Milestone: | LEMON 1.2 release → LEMON 1.3 release |
---|
Changed 14 years ago by
Attachment: | 6c97bde900e6.patch added |
---|
comment:8 follow-up: 9 Changed 14 years ago by
Added 6c97bde900e6.patch file contains an implementation for the Edmonds-Karp algorithm.
Changed 14 years ago by
Attachment: | 078bb2a214ca.patch added |
---|
comment:9 follow-up: 11 Changed 14 years ago by
Replying to thoneyvazul:
Added 6c97bde900e6.patch file contains an implementation for the Edmonds-Karp algorithm.
[078bb2a214ca] is a slight modification of the patch, namely
- it gives a reference to the svn revision it was (probably) ported from
- Doesn't list E-K amongst the 1.2 features (this version has already been released)
I basically like the port, but it would be nice if Peter could also have a look at it and adjust the namings at some places (e.g. template parameters) in order to better follow the conventions.
comment:10 Changed 14 years ago by
Cc: | Peter Kovacs added |
---|
comment:11 Changed 14 years ago by
Replying to alpar:
I basically like the port, but it would be nice if Peter could also have a look at it and adjust the namings at some places (e.g. template parameters) in order to better follow the conventions.
I'm going to check it soon (namings, doc, etc.)
Apart from that, I would like to merge the test file of E-K and Preflow (and all other max flow algorithms that will be ported in the future). They should have (almost) the same interface and hence can be tested together. For similar examples, see e.g. min_cost_flow_test.cc
and min_mean_cycle_test.cc
.
Changed 14 years ago by
Attachment: | be2b4a8d4548.patch added |
---|
comment:12 Changed 14 years ago by
In be2b4a8d4548.patch I rechecked the template parameter names and changed them a little bit, so that it is more consistent to the preflow algorithm.
comment:13 Changed 12 years ago by
I see no problem with version [be2b4a8d4548]. Peter, could you have a short look at it, too?
comment:14 follow-up: 15 Changed 12 years ago by
I revised [be2b4a8d4548] and made some patches for it, see attached file.
- [87df475c2753] Improve and fix API doc of EdmondsKarp according to Preflow
- [0ad9454fd0b6] Rename
DefFlowMap
named parameter toSetFlowMap
in EdmondsKarp according to Preflow - [d1c4ed808574] Rename flow init functions according to Preflow (
flowInit()
-->init()
,checkedFlowInit()
-->checkedInit()
) - [67ffe67e28de] Merge test files of Preflow and EdmondsKarp
- [2ecc1e07d4ff] Avoid usage of alternative operator
As for merging the test files: not only does this patch reduce code duplication (which is preferred in most cases), but it also helps preventing such inconsistencies that are fixed in the previous two commits.
As for the last changeset: I don't know if we accept such alternative operators (e.g. and, or) in LEMON code or not, but it was rather strange for me. You may omit this changeset if you don't like it.
Changed 12 years ago by
Attachment: | 177-patches-87df475c2753--2ecc1e07d4ff.patch added |
---|
comment:15 Changed 12 years ago by
Replying to kpeter:
As for the last changeset: I don't know if we accept such alternative operators (e.g. and, or) in LEMON code or not, but it was rather strange for me. You may omit this changeset if you don't like it.
You are right, it should be avoided. It may even cause some compatibility issues.
comment:16 Changed 12 years ago by
Resolution: | → done |
---|---|
Status: | assigned → closed |
I rebased the above patches to the current tip and pushed to the main branch. See [92a884824429], [6a8a688eacf6], [2f00ef323c2e], [08f2dc76e82e], [45befc97b1bc] and [473c71baff72].
Peter,
shouldn't we postpone this ticket to Milestone 1.2?
If yes, please do it.