added auxiliary Empty() function
This commit is contained in:
parent
5679b5862f
commit
4520e04d37
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user