equal
deleted
inserted
replaced
10 //#include <hugo/dijkstra.h> |
10 //#include <hugo/dijkstra.h> |
11 //#include <hugo/graph_wrapper.h> |
11 //#include <hugo/graph_wrapper.h> |
12 #include <hugo/maps.h> |
12 #include <hugo/maps.h> |
13 #include <vector> |
13 #include <vector> |
14 #include <hugo/mincostflows.h> |
14 #include <hugo/mincostflows.h> |
15 #include <for_each_macros.h> |
|
16 |
15 |
17 namespace hugo { |
16 namespace hugo { |
18 |
17 |
19 /// \addtogroup flowalgs |
18 /// \addtogroup flowalgs |
20 /// @{ |
19 /// @{ |
81 |
80 |
82 //We don't want to change the flow of mincost_flow, so we make a copy |
81 //We don't want to change the flow of mincost_flow, so we make a copy |
83 //The name here suggests that the flow has only 0/1 values. |
82 //The name here suggests that the flow has only 0/1 values. |
84 EdgeIntMap reversed(G); |
83 EdgeIntMap reversed(G); |
85 |
84 |
86 //FOR_EACH_LOC(typename Graph::EdgeIt, e, G){ |
85 for(typename Graph::EdgeIt e(G); e!=INVALID; ++e) |
87 for(typename Graph::EdgeIt e=loopFirst(typename Graph::EdgeIt(), (G)); e!=INVALID; ++e){ |
|
88 reversed[e] = mincost_flow.getFlow()[e]; |
86 reversed[e] = mincost_flow.getFlow()[e]; |
89 } |
|
90 |
87 |
91 paths.clear(); |
88 paths.clear(); |
92 //total_length=0; |
89 //total_length=0; |
93 paths.resize(k); |
90 paths.resize(k); |
94 for (int j=0; j<i; ++j){ |
91 for (int j=0; j<i; ++j){ |