test/heap_test.cc
changeset 2038 33db14058543
parent 1956 a055123339d5
child 2108 f2c532541730
equal deleted inserted replaced
4:3b6fd5c06122 5:9cc470c0a580
    29 #include <lemon/graph_reader.h>
    29 #include <lemon/graph_reader.h>
    30 
    30 
    31 #include <lemon/bin_heap.h>
    31 #include <lemon/bin_heap.h>
    32 #include <lemon/fib_heap.h>
    32 #include <lemon/fib_heap.h>
    33 #include <lemon/radix_heap.h>
    33 #include <lemon/radix_heap.h>
    34 #include <lemon/linear_heap.h>
    34 #include <lemon/bucket_heap.h>
    35 
    35 
    36 #include "test_tools.h"
    36 #include "test_tools.h"
    37 
    37 
    38 #include "heap_test.h"
    38 #include "heap_test.h"
    39 
    39 
   118     dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
   118     dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
   119     std::cout << timer << std::endl;
   119     std::cout << timer << std::endl;
   120   }
   120   }
   121 
   121 
   122   {
   122   {
   123     std::cerr << "Checking Linear Heap" << std::endl;
   123     std::cerr << "Checking Bucket Heap" << std::endl;
   124 
   124 
   125     typedef LinearHeap<Item, ItemIntMap> IntHeap;
   125     typedef BucketHeap<Item, ItemIntMap> IntHeap;
   126     checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>();
   126     checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>();
   127     heapSortTest<IntHeap>(100);
   127     heapSortTest<IntHeap>(100);
   128     heapIncreaseTest<IntHeap>(100);
   128     heapIncreaseTest<IntHeap>(100);
   129 
   129 
   130     typedef LinearHeap<Node, Graph::NodeMap<int> > NodeHeap;
   130     typedef BucketHeap<Node, Graph::NodeMap<int> > NodeHeap;
   131     checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
   131     checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
   132     Timer timer;
   132     Timer timer;
   133     dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
   133     dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
   134     std::cout << timer << std::endl;
   134     std::cout << timer << std::endl;
   135   }
   135   }