Lines Matching defs:Heap
0 // heap.h
17 // Implementation of a heap as in STL, but allows tracking positions
18 // in heap using a key. The key can be used to do an in place update of
19 // values in the heap.
30 // \class Heap
31 // \brief A templated heap implementation that support in place update
34 // The templated heap implementation is a little different from the
35 // STL priority_queue and the *_heap operations in STL. The heap
36 // supports indexing of values in the heap via an associated key.
39 // to the calling functions on heap insert. This key can be used
40 // to later update the specific value in the heap.
47 class Heap {
51 Heap(Compare comp) : comp_(comp), size_(0) { }
53 // Create a heap with initial size of internal arrays of 1024
54 Heap() : size_(0) { }
56 ~Heap() { }
58 // insert a value into the heap
74 // indexed by the key. The position gives the position in the heap array.
75 // Once we have the position we can then use the standard heap operations
87 // pop the (best/worst) from the heap
97 // return value of best in heap
102 // check if the heap is empty
114 // for managing the heap and keeping the heap properties.
136 // the position of the value in the heap
189 // DISALLOW_EVIL_CONSTRUCTORS(Heap);