1.1 --- a/lemon/concept/heap.h Fri Oct 07 11:05:35 2005 +0000
1.2 +++ b/lemon/concept/heap.h Fri Oct 14 10:40:00 2005 +0000
1.3 @@ -61,15 +61,21 @@
1.4 /// should be PRE_HEAP (-1) for each element.
1.5 explicit Heap(ItemIntMap &_iim) {}
1.6
1.7 - /// The number of items stored in the heap.
1.8 + /// \brief The number of items stored in the heap.
1.9 ///
1.10 - /// \brief Returns the number of items stored in the heap.
1.11 + /// Returns the number of items stored in the heap.
1.12 int size() const { return 0; }
1.13 +
1.14 /// \brief Checks if the heap stores no items.
1.15 ///
1.16 /// Returns \c true if and only if the heap stores no items.
1.17 bool empty() const { return false; }
1.18
1.19 + /// \brief Makes empty this heap.
1.20 + ///
1.21 + /// Makes this heap empty.
1.22 + void clear();
1.23 +
1.24 /// \brief Insert an item into the heap with the given heap.
1.25 ///
1.26 /// Adds \c i to the heap with priority \c p.
1.27 @@ -189,6 +195,8 @@
1.28 state = _Heap::PRE_HEAP;
1.29 state = _Heap::IN_HEAP;
1.30 state = _Heap::POST_HEAP;
1.31 +
1.32 + heap.clear();
1.33 }
1.34
1.35 _Heap& heap;