Fix processedMap() named parameter for dijkstra() (ticket #140)
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 02 Sep 2008 00:44:17 +0200
changeset 251a1ffc9099c25
parent 249 f0b89f242745
child 255 914c5432be97
Fix processedMap() named parameter for dijkstra() (ticket #140)
lemon/dijkstra.h
     1.1 --- a/lemon/dijkstra.h	Mon Aug 18 20:33:11 2008 +0200
     1.2 +++ b/lemon/dijkstra.h	Tue Sep 02 00:44:17 2008 +0200
     1.3 @@ -1068,6 +1068,8 @@
     1.4      void *_g;
     1.5      //Pointer to the length map
     1.6      void *_length;
     1.7 +    //Pointer to the map of processed nodes.
     1.8 +    void *_processed;
     1.9      //Pointer to the map of predecessors arcs.
    1.10      void *_pred;
    1.11      //Pointer to the map of distances.
    1.12 @@ -1080,7 +1082,7 @@
    1.13  
    1.14      /// This constructor does not require parameters, therefore it initiates
    1.15      /// all of the attributes to default values (0, INVALID).
    1.16 -    DijkstraWizardBase() : _g(0), _length(0), _pred(0),
    1.17 +    DijkstraWizardBase() : _g(0), _length(0), _processed(0), _pred(0),
    1.18                             _dist(0), _source(INVALID) {}
    1.19  
    1.20      /// Constructor.
    1.21 @@ -1094,7 +1096,7 @@
    1.22      DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
    1.23        _g(reinterpret_cast<void*>(const_cast<GR*>(&g))),
    1.24        _length(reinterpret_cast<void*>(const_cast<LM*>(&l))),
    1.25 -      _pred(0), _dist(0), _source(s) {}
    1.26 +      _processed(0), _pred(0), _dist(0), _source(s) {}
    1.27  
    1.28    };
    1.29  
    1.30 @@ -1173,8 +1175,12 @@
    1.31        Dijkstra<Digraph,LengthMap,TR>
    1.32          dij(*reinterpret_cast<const Digraph*>(Base::_g),
    1.33              *reinterpret_cast<const LengthMap*>(Base::_length));
    1.34 -      if(Base::_pred) dij.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
    1.35 -      if(Base::_dist) dij.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
    1.36 +      if(Base::_processed)
    1.37 +        dij.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
    1.38 +      if(Base::_pred)
    1.39 +        dij.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
    1.40 +      if(Base::_dist)
    1.41 +        dij.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
    1.42        dij.run(Base::_source);
    1.43      }
    1.44