# HG changeset patch # User alpar # Date 1083745099 0 # Node ID 2544205de12969b9ac14163cf584f4d3642d5137 # Parent 66f1c466889f0a24644380c62b8c1299bb1e622a Compiles also with icc. diff -r 66f1c466889f -r 2544205de129 src/include/dijkstra.h --- a/src/include/dijkstra.h Wed May 05 07:53:51 2004 +0000 +++ b/src/include/dijkstra.h Wed May 05 08:18:19 2004 +0000 @@ -45,7 +45,7 @@ #else template , - template class Heap = BinHeap > + template class Heap = BinHeap > #endif class Dijkstra{ public: @@ -146,7 +146,7 @@ ///- The shortest path tree. ///- The distance of each node from the root. template class Heap > + template class Heap > void Dijkstra::run(Node s) { NodeIt u; @@ -157,8 +157,11 @@ typename Graph::template NodeMap heap_map(G,-1); - Heap > - heap(heap_map); + typedef Heap, + std::less > + HeapType; + + HeapType heap(heap_map); heap.push(s,0); @@ -176,19 +179,19 @@ Node w=G.bNode(e); switch(heap.state(w)) { - case heap.PRE_HEAP: + case HeapType::PRE_HEAP: heap.push(w,oldvalue+length[e]); predecessor.set(w,e); pred_node.set(w,v); break; - case heap.IN_HEAP: + case HeapType::IN_HEAP: if ( oldvalue+length[e] < heap[w] ) { heap.decrease(w, oldvalue+length[e]); predecessor.set(w,e); pred_node.set(w,v); } break; - case heap.POST_HEAP: + case HeapType::POST_HEAP: break; } }