# HG changeset patch # User Peter Kovacs # Date 1247099987 -7200 # Node ID bdc7dfc8c054a3033e317e4aee597ac5c11af468 # Parent d1a9224f1e305286f983295c5215b2fa7b8ae0bc Bug fix in PairingHeap::pop() (#301) diff -r d1a9224f1e30 -r bdc7dfc8c054 lemon/pairing_heap.h --- a/lemon/pairing_heap.h Thu Jul 09 02:38:01 2009 +0200 +++ b/lemon/pairing_heap.h Thu Jul 09 02:39:47 2009 +0200 @@ -266,6 +266,8 @@ minimum = container[minimum].child; } + if (minimum >= 0) container[minimum].left_child = false; + --num_items; } diff -r d1a9224f1e30 -r bdc7dfc8c054 test/heap_test.cc --- a/test/heap_test.cc Thu Jul 09 02:38:01 2009 +0200 +++ b/test/heap_test.cc Thu Jul 09 02:39:47 2009 +0200 @@ -222,16 +222,16 @@ } // PairingHeap -// { -// typedef PairingHeap IntHeap; -// checkConcept, IntHeap>(); -// heapSortTest(); -// heapIncreaseTest(); -// -// typedef PairingHeap NodeHeap; -// checkConcept, NodeHeap>(); -// dijkstraHeapTest(digraph, length, source); -// } + { + typedef PairingHeap IntHeap; + checkConcept, IntHeap>(); + heapSortTest(); + heapIncreaseTest(); + + typedef PairingHeap NodeHeap; + checkConcept, NodeHeap>(); + dijkstraHeapTest(digraph, length, source); + } // RadixHeap {