src/demo/sub_graph_wrapper_demo.cc
changeset 934 003736604835
parent 931 9227ecd7b0bc
child 986 e997802b855c
equal deleted inserted replaced
5:80b7f66aa70a 6:79a21989f3df
    53   // given by the dijkstra algorithm.
    53   // given by the dijkstra algorithm.
    54   typedef TightEdgeFilterMap<Graph, const Dijkstra::DistMap, LengthMap> 
    54   typedef TightEdgeFilterMap<Graph, const Dijkstra::DistMap, LengthMap> 
    55     TightEdgeFilter;
    55     TightEdgeFilter;
    56   TightEdgeFilter tight_edge_filter(g, dijkstra.distMap(), length);
    56   TightEdgeFilter tight_edge_filter(g, dijkstra.distMap(), length);
    57 
    57 
    58   ConstMap<Node, bool> const_true_map(true);
    58 //  ConstMap<Node, bool> const_true_map(true);
    59   // This graph contains exaclty the tight edges.
    59   // This graph contains exaclty the tight edges.
    60   typedef SubGraphWrapper<Graph, ConstMap<Node, bool>, TightEdgeFilter> SubGW;
    60 // typedef SubGraphWrapper<Graph, ConstMap<Node, bool>, TightEdgeFilter> SubGW;
    61   SubGW gw(g, const_true_map, tight_edge_filter);
    61   typedef EdgeSubGraphWrapper<Graph, TightEdgeFilter> SubGW;
       
    62   SubGW gw(g, tight_edge_filter);
    62 
    63 
    63   ConstMap<Edge, int> const_1_map(1);
    64   ConstMap<Edge, int> const_1_map(1);
    64   Graph::EdgeMap<int> flow(g, 0);
    65   Graph::EdgeMap<int> flow(g, 0);
    65   // Max flow between s and t in the graph of tight edges.
    66   // Max flow between s and t in the graph of tight edges.
    66   Preflow<SubGW, int, ConstMap<Edge, int>, Graph::EdgeMap<int> > 
    67   Preflow<SubGW, int, ConstMap<Edge, int>, Graph::EdgeMap<int> >