COIN-OR::LEMON - Graph Library

Ticket #140: a1ffc9099c25.patch

File a1ffc9099c25.patch, 2.0 KB (added by Peter Kovacs, 16 years ago)
  • lemon/dijkstra.h

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1220309057 -7200
    # Node ID a1ffc9099c25c15e624e33c522a99ec3556d8d0c
    # Parent  f0b89f24274560f96db7740ebb807719f5e5e369
    Fix processedMap() named parameter for dijkstra() (ticket #140)
    
    diff -r f0b89f242745 -r a1ffc9099c25 lemon/dijkstra.h
    a b  
    10681068    void *_g;
    10691069    //Pointer to the length map
    10701070    void *_length;
     1071    //Pointer to the map of processed nodes.
     1072    void *_processed;
    10711073    //Pointer to the map of predecessors arcs.
    10721074    void *_pred;
    10731075    //Pointer to the map of distances.
     
    10801082
    10811083    /// This constructor does not require parameters, therefore it initiates
    10821084    /// all of the attributes to default values (0, INVALID).
    1083     DijkstraWizardBase() : _g(0), _length(0), _pred(0),
     1085    DijkstraWizardBase() : _g(0), _length(0), _processed(0), _pred(0),
    10841086                           _dist(0), _source(INVALID) {}
    10851087
    10861088    /// Constructor.
     
    10941096    DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
    10951097      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))),
    10961098      _length(reinterpret_cast<void*>(const_cast<LM*>(&l))),
    1097       _pred(0), _dist(0), _source(s) {}
     1099      _processed(0), _pred(0), _dist(0), _source(s) {}
    10981100
    10991101  };
    11001102
     
    11731175      Dijkstra<Digraph,LengthMap,TR>
    11741176        dij(*reinterpret_cast<const Digraph*>(Base::_g),
    11751177            *reinterpret_cast<const LengthMap*>(Base::_length));
    1176       if(Base::_pred) dij.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
    1177       if(Base::_dist) dij.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
     1178      if(Base::_processed)
     1179        dij.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
     1180      if(Base::_pred)
     1181        dij.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
     1182      if(Base::_dist)
     1183        dij.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
    11781184      dij.run(Base::_source);
    11791185    }
    11801186