Compiles also with icc.
1.1 --- a/src/include/dijkstra.h Wed May 05 07:53:51 2004 +0000
1.2 +++ b/src/include/dijkstra.h Wed May 05 08:18:19 2004 +0000
1.3 @@ -45,7 +45,7 @@
1.4 #else
1.5 template <typename Graph,
1.6 typename LengthMap=typename Graph::template EdgeMap<int>,
1.7 - template <class,class,class> class Heap = BinHeap >
1.8 + template <class,class,class,class> class Heap = BinHeap >
1.9 #endif
1.10 class Dijkstra{
1.11 public:
1.12 @@ -146,7 +146,7 @@
1.13 ///- The shortest path tree.
1.14 ///- The distance of each node from the root.
1.15 template <typename Graph, typename LengthMap,
1.16 - template<class,class,class> class Heap >
1.17 + template<class,class,class,class> class Heap >
1.18 void Dijkstra<Graph,LengthMap,Heap>::run(Node s) {
1.19
1.20 NodeIt u;
1.21 @@ -157,8 +157,11 @@
1.22
1.23 typename Graph::template NodeMap<int> heap_map(G,-1);
1.24
1.25 - Heap<Node, ValueType, typename Graph::template NodeMap<int> >
1.26 - heap(heap_map);
1.27 + typedef Heap<Node, ValueType, typename Graph::template NodeMap<int>,
1.28 + std::less<ValueType> >
1.29 + HeapType;
1.30 +
1.31 + HeapType heap(heap_map);
1.32
1.33 heap.push(s,0);
1.34
1.35 @@ -176,19 +179,19 @@
1.36 Node w=G.bNode(e);
1.37
1.38 switch(heap.state(w)) {
1.39 - case heap.PRE_HEAP:
1.40 + case HeapType::PRE_HEAP:
1.41 heap.push(w,oldvalue+length[e]);
1.42 predecessor.set(w,e);
1.43 pred_node.set(w,v);
1.44 break;
1.45 - case heap.IN_HEAP:
1.46 + case HeapType::IN_HEAP:
1.47 if ( oldvalue+length[e] < heap[w] ) {
1.48 heap.decrease(w, oldvalue+length[e]);
1.49 predecessor.set(w,e);
1.50 pred_node.set(w,v);
1.51 }
1.52 break;
1.53 - case heap.POST_HEAP:
1.54 + case HeapType::POST_HEAP:
1.55 break;
1.56 }
1.57 }