# HG changeset patch # User deba # Date 1162210072 0 # Node ID fb1c634fff293a1091579eb9e3402b4727d9769f # Parent ad15bdd334bfa122e5ab7d3d4b43274b421790dd Bug fix for removing heap Item from template parameter list diff -r ad15bdd334bf -r fb1c634fff29 demo/coloring.cc --- a/demo/coloring.cc Mon Oct 30 12:01:51 2006 +0000 +++ b/demo/coloring.cc Mon Oct 30 12:07:52 2006 +0000 @@ -63,7 +63,7 @@ Graph::NodeMap<int> color(graph, -2); Graph::NodeMap<int> heapMap(graph, -1); - BucketHeap<Node, Graph::NodeMap<int> > heap(heapMap); + BucketHeap<Graph::NodeMap<int> > heap(heapMap); for (NodeIt it(graph); it != INVALID; ++it) { heap.push(it, countOutEdges(graph, it)); diff -r ad15bdd334bf -r fb1c634fff29 lemon/bipartite_matching.h --- a/lemon/bipartite_matching.h Mon Oct 30 12:01:51 2006 +0000 +++ b/lemon/bipartite_matching.h Mon Oct 30 12:07:52 2006 +0000 @@ -1094,7 +1094,7 @@ /// anode graph's node. /// /// \sa BinHeap - typedef BinHeap<typename BpUGraph::Node, Value, HeapCrossRef> Heap; + typedef BinHeap<Value, HeapCrossRef> Heap; /// \brief Instantiates a Heap. /// diff -r ad15bdd334bf -r fb1c634fff29 lemon/dijkstra.h --- a/lemon/dijkstra.h Mon Oct 30 12:01:51 2006 +0000 +++ b/lemon/dijkstra.h Mon Oct 30 12:07:52 2006 +0000 @@ -1014,7 +1014,7 @@ typedef typename TR::DistMap DistMap; ///The heap type used by the dijkstra algorithm. typedef typename TR::Heap Heap; -public: + public: /// Constructor. DijkstraWizard() : TR() {} diff -r ad15bdd334bf -r fb1c634fff29 test/all_pairs_shortest_path_test.cc --- a/test/all_pairs_shortest_path_test.cc Mon Oct 30 12:01:51 2006 +0000 +++ b/test/all_pairs_shortest_path_test.cc Mon Oct 30 12:07:52 2006 +0000 @@ -74,7 +74,7 @@ cout << "Johnson: " << timer << endl; } - typedef FibHeap<Node, int, Graph::NodeMap<int> > IntFibHeap; + typedef FibHeap<int, Graph::NodeMap<int> > IntFibHeap; Johnson<Graph, LengthMap>::DefStandardHeap<IntFibHeap> ::Create fibJohnson(graph, length); { diff -r ad15bdd334bf -r fb1c634fff29 test/heap_test.cc --- a/test/heap_test.cc Mon Oct 30 12:01:51 2006 +0000 +++ b/test/heap_test.cc Mon Oct 30 12:07:52 2006 +0000 @@ -79,13 +79,13 @@ { std::cerr << "Checking Bin Heap" << std::endl; - typedef BinHeap<Item, Prio, ItemIntMap> IntHeap; - checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>(); + typedef BinHeap<Prio, ItemIntMap> IntHeap; + checkConcept<Heap<Prio, ItemIntMap>, IntHeap>(); heapSortTest<IntHeap>(100); heapIncreaseTest<IntHeap>(100); - typedef FibHeap<Node, Prio, Graph::NodeMap<int> > NodeHeap; - checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>(); + typedef FibHeap<Prio, Graph::NodeMap<int> > NodeHeap; + checkConcept<Heap<Prio, Graph::NodeMap<int> >, NodeHeap>(); Timer timer; dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start); std::cout << timer << std::endl; @@ -93,13 +93,13 @@ { std::cerr << "Checking Fib Heap" << std::endl; - typedef FibHeap<Item, Prio, ItemIntMap> IntHeap; - checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>(); + typedef FibHeap<Prio, ItemIntMap> IntHeap; + checkConcept<Heap<Prio, ItemIntMap>, IntHeap>(); heapSortTest<IntHeap>(100); heapIncreaseTest<IntHeap>(100); - typedef FibHeap<Node, Prio, Graph::NodeMap<int> > NodeHeap; - checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>(); + typedef FibHeap<Prio, Graph::NodeMap<int> > NodeHeap; + checkConcept<Heap<Prio, Graph::NodeMap<int> >, NodeHeap>(); Timer timer; dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start); std::cout << timer << std::endl; @@ -107,13 +107,13 @@ { std::cerr << "Checking Radix Heap" << std::endl; - typedef RadixHeap<Item, ItemIntMap> IntHeap; - checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>(); + typedef RadixHeap<ItemIntMap> IntHeap; + checkConcept<Heap<Prio, ItemIntMap>, IntHeap>(); heapSortTest<IntHeap>(100); heapIncreaseTest<IntHeap>(100); - typedef RadixHeap<Node, Graph::NodeMap<int> > NodeHeap; - checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>(); + typedef RadixHeap<Graph::NodeMap<int> > NodeHeap; + checkConcept<Heap<Prio, Graph::NodeMap<int> >, NodeHeap>(); Timer timer; dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start); std::cout << timer << std::endl; @@ -122,13 +122,13 @@ { std::cerr << "Checking Bucket Heap" << std::endl; - typedef BucketHeap<Item, ItemIntMap> IntHeap; - checkConcept<Heap<Item, Prio, ItemIntMap>, IntHeap>(); + typedef BucketHeap<ItemIntMap> IntHeap; + checkConcept<Heap<Prio, ItemIntMap>, IntHeap>(); heapSortTest<IntHeap>(100); heapIncreaseTest<IntHeap>(100); - typedef BucketHeap<Node, Graph::NodeMap<int> > NodeHeap; - checkConcept<Heap<Node, Prio, Graph::NodeMap<int> >, NodeHeap>(); + typedef BucketHeap<Graph::NodeMap<int> > NodeHeap; + checkConcept<Heap<Prio, Graph::NodeMap<int> >, NodeHeap>(); Timer timer; dijkstraHeapTest<Graph, LengthMap, NodeHeap>(graph, length, start); std::cout << timer << std::endl; diff -r ad15bdd334bf -r fb1c634fff29 test/heap_test.h --- a/test/heap_test.h Mon Oct 30 12:01:51 2006 +0000 +++ b/test/heap_test.h Mon Oct 30 12:07:52 2006 +0000 @@ -25,6 +25,9 @@ public: typedef std::vector<int> Parent; + typedef int Key; + typedef int Value; + IntIntMap() : Parent() {} IntIntMap(int n) : Parent(n) {} IntIntMap(int n, int v) : Parent(n, v) {}