More stats collection extensions.

This commit is contained in:
Seth Hall 2016-01-08 17:03:16 -05:00
parent 6d836b7956
commit 3c71d4ffa8
8 changed files with 47 additions and 10 deletions

View file

@ -13,7 +13,7 @@ PriorityQueue::PriorityQueue(int initial_size)
{
max_heap_size = initial_size;
heap = new PQ_Element*[max_heap_size];
peak_heap_size = heap_size = 0;
peak_heap_size = heap_size = cumulative_num = 0;
}
PriorityQueue::~PriorityQueue()
@ -62,6 +62,7 @@ int PriorityQueue::Add(PQ_Element* e)
BubbleUp(heap_size);
++cumulative_num;
if ( ++heap_size > peak_heap_size )
peak_heap_size = heap_size;