COIN-OR::LEMON - Graph Library

Changeset 1229:aa65e46aebc3 in lemon-0.x


Ignore:
Timestamp:
03/21/05 08:47:00 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1656
Message:

Bugfix, thanks to Janos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/dijkstra.h

    r1220 r1229  
    473473    ///
    474474    ///\todo _heap_map's type could also be in the traits class.
     475    ///\todo The heaps should be able to make themselves empty directly.
    475476    void init()
    476477    {
    477478      create_maps();
    478      
     479      while(!_heap.empty()) _heap.pop();
    479480      for ( NodeIt u(*G) ; u!=INVALID ; ++u ) {
    480481        _pred->set(u,INVALID);
     
    585586    {
    586587      while ( !_heap.empty() && _heap.top()!=dest ) processNextNode();
    587       if ( _heap.top()==dest ) finalizeNodeData(_heap.top());
     588      if ( !_heap.empty() ) finalizeNodeData(_heap.top(),_heap.prio());
    588589    }
    589590   
     
    601602    {
    602603      while ( !_heap.empty() && !nm[_heap.top()] ) processNextNode();
    603       if ( !_heap.empty() ) finalizeNodeData(_heap.top());
     604      if ( !_heap.empty() ) finalizeNodeData(_heap.top(),_heap.prio());
    604605    }
    605606   
     
    855856  };
    856857 
    857   /// A class to make easier the usage of Dijkstra algorithm
     858  /// A class to make the usage of Dijkstra algorithm easier
    858859
    859860  /// This class is created to make it easier to use Dijkstra algorithm.
Note: See TracChangeset for help on using the changeset viewer.