src/work/athos/minlengthpaths.h
changeset 382 f177fc597abd
parent 329 0dade87d013b
child 430 60e4627e8c74
equal deleted inserted replaced
6:463a0ccbdea0 7:8b7a3a00dc8a
    35     typedef typename Graph::OutEdgeIt OutEdgeIt;
    35     typedef typename Graph::OutEdgeIt OutEdgeIt;
    36     typedef typename Graph::EdgeMap<int> EdgeIntMap;
    36     typedef typename Graph::EdgeMap<int> EdgeIntMap;
    37 
    37 
    38     typedef ConstMap<Edge,int> ConstMap;
    38     typedef ConstMap<Edge,int> ConstMap;
    39 
    39 
    40     typedef ResGraphWrapper<const Graph,int,EdgeIntMap,ConstMap> ResGraphType;
    40     typedef ResGraphWrapper<const Graph,int,ConstMap,EdgeIntMap> ResGraphType;
    41 
    41 
    42 
    42 
    43     class ModLengthMap {   
    43     class ModLengthMap {   
    44       typedef typename ResGraphType::NodeMap<Length> NodeMap;
    44       typedef typename ResGraphType::NodeMap<Length> NodeMap;
    45       const ResGraphType& G;
    45       const ResGraphType& G;
    90     ///Otherwise it returns the number of found edge-disjoint paths from s to t.
    90     ///Otherwise it returns the number of found edge-disjoint paths from s to t.
    91     int run(Node s, Node t, int k) {
    91     int run(Node s, Node t, int k) {
    92       ConstMap const1map(1);
    92       ConstMap const1map(1);
    93 
    93 
    94       //We need a residual graph, in which some of the edges are reversed
    94       //We need a residual graph, in which some of the edges are reversed
    95       ResGraphType res_graph(G, reversed, const1map);
    95       ResGraphType res_graph(G, const1map, reversed);
    96 
    96 
    97       //Initialize the copy of the Dijkstra potential to zero
    97       //Initialize the copy of the Dijkstra potential to zero
    98       typename ResGraphType::NodeMap<Length> dijkstra_dist(res_graph);
    98       typename ResGraphType::NodeMap<Length> dijkstra_dist(res_graph);
    99       ModLengthMap mod_length(res_graph, reversed, length, dijkstra_dist);
    99       ModLengthMap mod_length(res_graph, reversed, length, dijkstra_dist);
   100 
   100