1.1 --- a/test/heap_test.cc Fri Oct 14 11:02:34 2005 +0000
1.2 +++ b/test/heap_test.cc Fri Oct 14 11:03:40 2005 +0000
1.3 @@ -15,11 +15,13 @@
1.4 #include <lemon/bin_heap.h>
1.5 #include <lemon/fib_heap.h>
1.6 #include <lemon/radix_heap.h>
1.7 +#include <lemon/linear_heap.h>
1.8
1.9 #include "test_tools.h"
1.10
1.11 #include "heap_test.h"
1.12
1.13 +#include <lemon/time_measure.h>
1.14
1.15 using namespace lemon;
1.16 using namespace lemon::concept;
1.17 @@ -65,7 +67,9 @@
1.18
1.19 typedef FibHeap<Node, Prio, Graph::NodeMap<int> > NodeHeap;
1.20 checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
1.21 + Timer timer;
1.22 dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
1.23 + std::cout << timer << std::endl;
1.24 }
1.25 {
1.26 std::cerr << "Checking Fib Heap" << std::endl;
1.27 @@ -77,7 +81,9 @@
1.28
1.29 typedef FibHeap<Node, Prio, Graph::NodeMap<int> > NodeHeap;
1.30 checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
1.31 + Timer timer;
1.32 dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
1.33 + std::cout << timer << std::endl;
1.34 }
1.35 {
1.36 std::cerr << "Checking Radix Heap" << std::endl;
1.37 @@ -89,7 +95,24 @@
1.38
1.39 typedef RadixHeap<Node, Graph::NodeMap<int> > NodeHeap;
1.40 checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
1.41 + Timer timer;
1.42 dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
1.43 + std::cout << timer << std::endl;
1.44 + }
1.45 +
1.46 + {
1.47 + std::cerr << "Checking Linear Heap" << std::endl;
1.48 +
1.49 + typedef LinearHeap<Item, ItemIntMap> IntHeap;
1.50 + checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>();
1.51 + heapSortTest<IntHeap>(100);
1.52 + heapIncreaseTest<IntHeap>(100);
1.53 +
1.54 + typedef LinearHeap<Node, Graph::NodeMap<int> > NodeHeap;
1.55 + checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>();
1.56 + Timer timer;
1.57 + dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start);
1.58 + std::cout << timer << std::endl;
1.59 }
1.60
1.61 std::cout << __FILE__ ": All tests passed.\n";