added auxiliary Empty() function

This commit is contained in:
Dennis Luxen 2013-09-21 21:51:07 +02:00
parent 5679b5862f
commit 4520e04d37

View File

@ -125,6 +125,10 @@ public:
return static_cast<Key>( heap.size() - 1 ); return static_cast<Key>( heap.size() - 1 );
} }
bool Empty() const {
return 0 == Size();
}
void Insert( NodeID node, Weight weight, const Data &data ) { void Insert( NodeID node, Weight weight, const Data &data ) {
HeapElement element; HeapElement element;
element.index = static_cast<NodeID>(insertedNodes.size()); element.index = static_cast<NodeID>(insertedNodes.size());