test/heap_test.h
changeset 1728 eb8bb91ba9e2
parent 1435 8e85e6bbefdf
child 1745 d356e54bdafc
     1.1 --- a/test/heap_test.h	Fri Oct 14 11:02:34 2005 +0000
     1.2 +++ b/test/heap_test.h	Fri Oct 14 11:03:40 2005 +0000
     1.3 @@ -1,4 +1,4 @@
     1.4 -// -+- c++ -+-
     1.5 +// -*- c++ -*-
     1.6  
     1.7  #include <vector>
     1.8  #include <algorithm>
     1.9 @@ -65,11 +65,6 @@
    1.10  
    1.11  
    1.12  
    1.13 -template <typename _Traits, typename _Heap>
    1.14 -struct DefHeapTraits : public _Traits {
    1.15 -  typedef _Heap Heap;
    1.16 -};
    1.17 -
    1.18  template <typename _Graph, typename _LengthMap, typename _Heap>
    1.19  void dijkstraHeapTest(_Graph& graph, _LengthMap& length,
    1.20  		      typename _Graph::Node& start) {
    1.21 @@ -83,9 +78,8 @@
    1.22    typedef typename Graph::NodeIt NodeIt;
    1.23    typedef typename Graph::EdgeIt EdgeIt;
    1.24  
    1.25 -  Dijkstra<Graph, LengthMap, 
    1.26 -    DefHeapTraits<DijkstraDefaultTraits<Graph, LengthMap>, Heap> > 
    1.27 -    dijkstra(graph, length);
    1.28 +  typename Dijkstra<Graph, LengthMap>::template DefHeap<Heap>::
    1.29 +    Create dijkstra(graph, length);
    1.30  
    1.31    dijkstra.run(start);
    1.32  
    1.33 @@ -94,7 +88,7 @@
    1.34      Node v=graph.target(e);
    1.35      if (dijkstra.reached(u)) {
    1.36        check( dijkstra.dist(v) - dijkstra.dist(u) <= length[e],
    1.37 -	     "Error in a shortest path tree edge!");
    1.38 +      	     "Error in a shortest path tree edge!");
    1.39      }
    1.40    }
    1.41