From 4520e04d371cb0b009cce274f7b8a9bd1fe9b191 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Sat, 21 Sep 2013 21:51:07 +0200 Subject: [PATCH] added auxiliary Empty() function --- DataStructures/BinaryHeap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DataStructures/BinaryHeap.h b/DataStructures/BinaryHeap.h index b1e838b8f..5978cd889 100644 --- a/DataStructures/BinaryHeap.h +++ b/DataStructures/BinaryHeap.h @@ -125,6 +125,10 @@ public: return static_cast( heap.size() - 1 ); } + bool Empty() const { + return 0 == Size(); + } + void Insert( NodeID node, Weight weight, const Data &data ) { HeapElement element; element.index = static_cast(insertedNodes.size());