Mukodik a Suurballe
authorathos
Mon, 05 Apr 2004 11:55:01 +0000
changeset 29165460cbf9e90
parent 290 e37a05270e80
child 292 9e2c108ec0f9
Mukodik a Suurballe
src/work/athos/suurballe.h
     1.1 --- a/src/work/athos/suurballe.h	Sun Apr 04 11:38:07 2004 +0000
     1.2 +++ b/src/work/athos/suurballe.h	Mon Apr 05 11:55:01 2004 +0000
     1.3 @@ -27,6 +27,8 @@
     1.4      class ConstMap {
     1.5      public :
     1.6        typedef int ValueType;
     1.7 +      typedef typename Graph::Edge KeyType;
     1.8 +
     1.9        int operator[](typename Graph::Edge e) const { 
    1.10  	return 1;
    1.11        } 
    1.12 @@ -58,7 +60,9 @@
    1.13      typedef typename Graph::NodeIt NodeIt;
    1.14      typedef typename Graph::Edge Edge;
    1.15      typedef typename Graph::OutEdgeIt OutEdgeIt;
    1.16 -    typedef ResGraphWrapper< Graph,T,typename Graph::EdgeMap<int>, ConstMap > ResGraphType;
    1.17 +    typedef TrivGraphWrapper<const Graph> TrivGraphType;
    1.18 +    typedef ResGraphWrapper<TrivGraphType,int,typename Graph::EdgeMap<int>,
    1.19 +      ConstMap> ResGraphType;
    1.20  
    1.21      const Graph& G;
    1.22      const LengthMap& length;
    1.23 @@ -82,7 +86,8 @@
    1.24        LengthMap mod_length_c = length;
    1.25        ConstMap const1map;
    1.26        //ResGraphWrapper< Graph,T,typename Graph::EdgeMap<int>, ConstMap> 
    1.27 -      ResGraphType res_graph(G, reversed, const1map);
    1.28 +      TrivGraphType ize(G);
    1.29 +      ResGraphType res_graph(ize, reversed, const1map);
    1.30        //ModLengthMap modified_length(length, dijkstra_dist);
    1.31        //Dijkstra<ResGraphType, ModLengthMap> dijkstra(res_graph, modified_length);
    1.32        //ResGraphWrapper< Graph,T,typename Graph::EdgeMap<int>, ConstMap>
    1.33 @@ -109,8 +114,8 @@
    1.34  	Node n=t;
    1.35  	Edge e;
    1.36  	while (n!=s){
    1.37 -	  e=dijkstra.pred(n);
    1.38 -	  n=dijkstra.predNode(n);
    1.39 +	  e = dijkstra.pred(n);
    1.40 +	  n = dijkstra.predNode(n);
    1.41  	  reversed[e] = 1-reversed[e];
    1.42  	}
    1.43