test/heap_test.cc
branch1.1
changeset 939 86a880ba752d
parent 728 532697c9fa53
child 1064 40bbb450143e
equal deleted inserted replaced
8:483949893dc0 11:4bf1b05a5283
    29 #include <lemon/lgf_reader.h>
    29 #include <lemon/lgf_reader.h>
    30 #include <lemon/dijkstra.h>
    30 #include <lemon/dijkstra.h>
    31 #include <lemon/maps.h>
    31 #include <lemon/maps.h>
    32 
    32 
    33 #include <lemon/bin_heap.h>
    33 #include <lemon/bin_heap.h>
    34 #include <lemon/fib_heap.h>
       
    35 #include <lemon/radix_heap.h>
       
    36 #include <lemon/bucket_heap.h>
       
    37 
    34 
    38 #include "test_tools.h"
    35 #include "test_tools.h"
    39 
    36 
    40 using namespace lemon;
    37 using namespace lemon;
    41 using namespace lemon::concepts;
    38 using namespace lemon::concepts;
   184     typedef BinHeap<Prio, IntNodeMap > NodeHeap;
   181     typedef BinHeap<Prio, IntNodeMap > NodeHeap;
   185     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
   182     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
   186     dijkstraHeapTest<NodeHeap>(digraph, length, source);
   183     dijkstraHeapTest<NodeHeap>(digraph, length, source);
   187   }
   184   }
   188 
   185 
   189   {
       
   190     typedef FibHeap<Prio, ItemIntMap> IntHeap;
       
   191     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
       
   192     heapSortTest<IntHeap>();
       
   193     heapIncreaseTest<IntHeap>();
       
   194 
       
   195     typedef FibHeap<Prio, IntNodeMap > NodeHeap;
       
   196     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
       
   197     dijkstraHeapTest<NodeHeap>(digraph, length, source);
       
   198   }
       
   199 
       
   200   {
       
   201     typedef RadixHeap<ItemIntMap> IntHeap;
       
   202     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
       
   203     heapSortTest<IntHeap>();
       
   204     heapIncreaseTest<IntHeap>();
       
   205 
       
   206     typedef RadixHeap<IntNodeMap > NodeHeap;
       
   207     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
       
   208     dijkstraHeapTest<NodeHeap>(digraph, length, source);
       
   209   }
       
   210 
       
   211   {
       
   212     typedef BucketHeap<ItemIntMap> IntHeap;
       
   213     checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
       
   214     heapSortTest<IntHeap>();
       
   215     heapIncreaseTest<IntHeap>();
       
   216 
       
   217     typedef BucketHeap<IntNodeMap > NodeHeap;
       
   218     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
       
   219     dijkstraHeapTest<NodeHeap>(digraph, length, source);
       
   220   }
       
   221 
       
   222 
       
   223   return 0;
   186   return 0;
   224 }
   187 }