test/heap_test.cc
changeset 900 5100072d83ca
parent 463 88ed40ad0d4f
child 748 d1a9224f1e30
child 912 37f440367057
equal deleted inserted replaced
7:7a2b45f04791 8:483949893dc0
    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>
    34 
    37 
    35 #include "test_tools.h"
    38 #include "test_tools.h"
    36 
    39 
    37 using namespace lemon;
    40 using namespace lemon;
    38 using namespace lemon::concepts;
    41 using namespace lemon::concepts;
   181     typedef BinHeap<Prio, IntNodeMap > NodeHeap;
   184     typedef BinHeap<Prio, IntNodeMap > NodeHeap;
   182     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
   185     checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
   183     dijkstraHeapTest<NodeHeap>(digraph, length, source);
   186     dijkstraHeapTest<NodeHeap>(digraph, length, source);
   184   }
   187   }
   185 
   188 
       
   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 
   186   return 0;
   223   return 0;
   187 }
   224 }