[Lemon-commits] [lemon_svn] deba: r3027 - in hugo/trunk: demo lemon test
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 21:51:55 CET 2006
Author: deba
Date: Mon Oct 30 13:07:52 2006
New Revision: 3027
Modified:
hugo/trunk/demo/coloring.cc
hugo/trunk/lemon/bipartite_matching.h
hugo/trunk/lemon/dijkstra.h
hugo/trunk/test/all_pairs_shortest_path_test.cc
hugo/trunk/test/heap_test.cc
hugo/trunk/test/heap_test.h
Log:
Bug fix for removing heap Item from template parameter list
Modified: hugo/trunk/demo/coloring.cc
==============================================================================
--- hugo/trunk/demo/coloring.cc (original)
+++ hugo/trunk/demo/coloring.cc Mon Oct 30 13:07:52 2006
@@ -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));
Modified: hugo/trunk/lemon/bipartite_matching.h
==============================================================================
--- hugo/trunk/lemon/bipartite_matching.h (original)
+++ hugo/trunk/lemon/bipartite_matching.h Mon Oct 30 13:07:52 2006
@@ -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.
///
Modified: hugo/trunk/lemon/dijkstra.h
==============================================================================
--- hugo/trunk/lemon/dijkstra.h (original)
+++ hugo/trunk/lemon/dijkstra.h Mon Oct 30 13:07:52 2006
@@ -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() {}
Modified: hugo/trunk/test/all_pairs_shortest_path_test.cc
==============================================================================
--- hugo/trunk/test/all_pairs_shortest_path_test.cc (original)
+++ hugo/trunk/test/all_pairs_shortest_path_test.cc Mon Oct 30 13:07:52 2006
@@ -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);
{
Modified: hugo/trunk/test/heap_test.cc
==============================================================================
--- hugo/trunk/test/heap_test.cc (original)
+++ hugo/trunk/test/heap_test.cc Mon Oct 30 13:07:52 2006
@@ -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;
Modified: hugo/trunk/test/heap_test.h
==============================================================================
--- hugo/trunk/test/heap_test.h (original)
+++ hugo/trunk/test/heap_test.h Mon Oct 30 13:07:52 2006
@@ -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) {}
More information about the Lemon-commits
mailing list