# HG changeset patch # User marci # Date 1095344847 0 # Node ID c19cf2007a7abfdf6c8c4bf15ab03af61455a859 # Parent 805963ea8654e8cb3fbead278aa6c975652c6d3b more docs diff -r 805963ea8654 -r c19cf2007a7a src/demo/sub_graph_wrapper_demo.cc --- a/src/demo/sub_graph_wrapper_demo.cc Thu Sep 16 14:01:36 2004 +0000 +++ b/src/demo/sub_graph_wrapper_demo.cc Thu Sep 16 14:27:27 2004 +0000 @@ -2,6 +2,8 @@ // Use a DIMACS max flow file as stdin. // sub_graph_wrapper_demo < dimacs_max_flow_file +// This program computes a maximum number of disjoint shortest paths +// between s and t. #include #include @@ -46,16 +48,21 @@ Dijkstra dijkstra(g, length); dijkstra.run(s); + // This map returns true exactly for those edges which are + // tight w.r.t the length funcion and the potential + // given by the dijkstra algorithm. typedef TightEdgeFilterMap TightEdgeFilter; TightEdgeFilter tight_edge_filter(g, dijkstra.distMap(), length); ConstMap const_true_map(true); + // This graph contains exaclty the tight edges. typedef SubGraphWrapper, TightEdgeFilter> SubGW; SubGW gw(g, const_true_map, tight_edge_filter); ConstMap const_1_map(1); Graph::EdgeMap flow(g, 0); + // Max flow between s and t in the graph of tight edges. Preflow, Graph::EdgeMap > preflow(gw, s, t, const_1_map, flow); preflow.run();