Changeset 532:2544205de129 in lemon0.x for src/include/dijkstra.h
 Timestamp:
 05/05/04 10:18:19 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@698
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/include/dijkstra.h
r491 r532 46 46 template <typename Graph, 47 47 typename LengthMap=typename Graph::template EdgeMap<int>, 48 template <class,class,class > class Heap = BinHeap >48 template <class,class,class,class> class Heap = BinHeap > 49 49 #endif 50 50 class Dijkstra{ … … 147 147 /// The distance of each node from the root. 148 148 template <typename Graph, typename LengthMap, 149 template<class,class,class > class Heap >149 template<class,class,class,class> class Heap > 150 150 void Dijkstra<Graph,LengthMap,Heap>::run(Node s) { 151 151 … … 158 158 typename Graph::template NodeMap<int> heap_map(G,1); 159 159 160 Heap<Node, ValueType, typename Graph::template NodeMap<int> > 161 heap(heap_map); 160 typedef Heap<Node, ValueType, typename Graph::template NodeMap<int>, 161 std::less<ValueType> > 162 HeapType; 163 164 HeapType heap(heap_map); 162 165 163 166 heap.push(s,0); … … 177 180 178 181 switch(heap.state(w)) { 179 case heap.PRE_HEAP:182 case HeapType::PRE_HEAP: 180 183 heap.push(w,oldvalue+length[e]); 181 184 predecessor.set(w,e); 182 185 pred_node.set(w,v); 183 186 break; 184 case heap.IN_HEAP:187 case HeapType::IN_HEAP: 185 188 if ( oldvalue+length[e] < heap[w] ) { 186 189 heap.decrease(w, oldvalue+length[e]); … … 189 192 } 190 193 break; 191 case heap.POST_HEAP:194 case HeapType::POST_HEAP: 192 195 break; 193 196 }
Note: See TracChangeset
for help on using the changeset viewer.