COIN-OR::LEMON - Graph Library

Changeset 217:fc549fac0dd0 in lemon-0.x for src/work/jacint/dijkstra.h


Ignore:
Timestamp:
03/20/04 17:13:19 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@312
Message:

Several bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/dijkstra.h

    r211 r217  
    4646    typename Graph::NodeMap<Edge> predecessor;
    4747    typename Graph::NodeMap<T> distance;
     48    //FIXME:
    4849    typename Graph::NodeMap<bool> reach;
     50    //typename Graph::NodeMap<int> reach;
    4951   
    5052  public :
     
    6668      }
    6769     
     70      //FIXME:
    6871      typename Graph::NodeMap<bool> scanned(G,false);
     72      //typename Graph::NodeMap<int> scanned(G,false);
    6973      typename Graph::NodeMap<int> heap_map(G,-1);
    7074     
     
    7781       
    7882        Node v=heap.top();
    79         T oldvalue=heap.get(v);
     83        T oldvalue=heap[v];
    8084        heap.pop();
    8185        distance.set(v, oldvalue);
     
    9195              heap.push(w,oldvalue+length[e]);
    9296              predecessor.set(w,e);
    93             } else if ( oldvalue+length[e] < heap.get(w) ) {
     97            } else if ( oldvalue+length[e] < heap[w] ) {
    9498              predecessor.set(w,e);
    9599              heap.decrease(w, oldvalue+length[e]);
     
    98102        }
    99103      }
    100     } 
     104    }
    101105   
    102 
    103106    T dist(Node v) {
    104107      return distance[v];
    105108    }
    106 
    107109
    108110    Edge pred(Node v) {
     
    110112    }
    111113     
    112 
    113114    bool reached(Node v) {
    114115      return reach[v];
Note: See TracChangeset for help on using the changeset viewer.