Changeset 78:ecc1171307be in lemon0.x for src/work/jacint/preflow_push_hl.h
 Timestamp:
 02/16/04 17:15:58 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@101
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/jacint/preflow_push_hl.h
r72 r78 30 30 #include <stack> 31 31 32 #include <reverse_bfs.h h>32 #include <reverse_bfs.h> 33 33 34 34 namespace marci { 35 35 36 template <typename Graph, typename T , typename FlowMap, typename CapacityMap>36 template <typename Graph, typename T> 37 37 class preflow_push_hl { 38 38 … … 48 48 NodeIt s; 49 49 NodeIt t; 50 Graph::EdgeMap<T> flow;51 Graph::EdgeMap<T> capacity;50 typename Graph::EdgeMap<T> flow; 51 typename Graph::EdgeMap<T> capacity; 52 52 T value; 53 Graph::NodeMap<bool> mincutvector;53 typename Graph::NodeMap<bool> mincutvector; 54 54 55 55 … … 57 57 58 58 preflow_push_hl(Graph& _G, NodeIt _s, NodeIt _t, 59 Graph::EdgeMap<T>& _capacity) :59 typename Graph::EdgeMap<T>& _capacity) : 60 60 G(_G), s(_s), t(_t), flow(_G, 0), capacity(_capacity), mincutvector(_G, true) { } 61 61 … … 69 69 void run() { 70 70 71 Graph::NodeMap<int> level(G); //level of Node72 Graph::NodeMap<T> excess(G); //excess of Node71 typename Graph::NodeMap<int> level(G); //level of Node 72 typename Graph::NodeMap<T> excess(G); //excess of Node 73 73 74 74 int n=G.nodeNum(); //number of Nodes … … 83 83 /*Reverse_bfs from t, to find the starting level.*/ 84 84 85 reverse_bfs< list_graph> bfs(G, t);85 reverse_bfs<Graph> bfs(G, t); 86 86 bfs.run(); 87 87 for(EachNodeIt v=G.template first<EachNodeIt>(); v.valid(); ++v) { … … 269 269 */ 270 270 271 EdgeMap<graph_type,T> allflow() {271 typename Graph::EdgeMap<T> allflow() { 272 272 return flow; 273 273 } … … 279 279 */ 280 280 281 NodeMap<graph_type,bool> mincut() {281 typename Graph::NodeMap<bool> mincut() { 282 282 283 283 std::queue<NodeIt> queue; … … 311 311 312 312 } 313 314 315 313 }; 316 314 }//namespace marci
Note: See TracChangeset
for help on using the changeset viewer.