Changeset 869:c19cf2007a7a in lemon0.x for src/demo/sub_graph_wrapper_demo.cc
 Timestamp:
 09/16/04 16:27:27 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1169
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/demo/sub_graph_wrapper_demo.cc
r867 r869 3 3 // Use a DIMACS max flow file as stdin. 4 4 // sub_graph_wrapper_demo < dimacs_max_flow_file 5 // This program computes a maximum number of disjoint shortest paths 6 // between s and t. 5 7 6 8 #include <iostream> … … 47 49 dijkstra.run(s); 48 50 51 // This map returns true exactly for those edges which are 52 // tight w.r.t the length funcion and the potential 53 // given by the dijkstra algorithm. 49 54 typedef TightEdgeFilterMap<Graph, const Dijkstra::DistMap, LengthMap> 50 55 TightEdgeFilter; … … 52 57 53 58 ConstMap<Node, bool> const_true_map(true); 59 // This graph contains exaclty the tight edges. 54 60 typedef SubGraphWrapper<Graph, ConstMap<Node, bool>, TightEdgeFilter> SubGW; 55 61 SubGW gw(g, const_true_map, tight_edge_filter); … … 57 63 ConstMap<Edge, int> const_1_map(1); 58 64 Graph::EdgeMap<int> flow(g, 0); 65 // Max flow between s and t in the graph of tight edges. 59 66 Preflow<SubGW, int, ConstMap<Edge, int>, Graph::EdgeMap<int> > 60 67 preflow(gw, s, t, const_1_map, flow);
Note: See TracChangeset
for help on using the changeset viewer.