|
Add(TObject,Integer)
|
Overloaded. Adds the item to the heap based on its priority.
When an item is added to the heap. It is pushed up from the bottom of the heap (the tree) until its Priority is not bigger (according to Order ) than any of its parents.
|
|
Assign(TPersistent)
|
Represents method Assign(TPersistent). (Inherited from DataStructures.TCustomHeap.)
|
|
Clear
|
Clears or empties the heap. (Inherited from DataStructures.TCustomHeap.)
|
|
Delete(Integer)
|
Deletes the node or heap element at the specified index in the heap. The item at the specified node is returned.
If the item to delete is the last one, delete it and shrink the tree, the tree will still be a heap. Otherwise, delete replace the item with the lowest, rightmost item in the heap and "reheapify".
|
|
Delete(THeapElement)
|
Overloaded. Deletes the heap element from the heap. The item at the specified node is returned.
(Inherited from DataStructures.TCustomHeap.)
|
|
GetCount
|
Returns the number of items in the heap (Inherited from DataStructures.TCustomHeap.)
|
|
GetItem(Integer)
|
Returns the item in the heap at the specified position. (Overrides DataStructures.TCustomHeap.GetItem(Integer).)
|
|
IndexOf(Integer)
|
Overloaded. Returns the index of the element in the heap that matches the specified priority. If no element has that priority, the function returns -1. (Inherited from DataStructures.TIntHeap.)
|
|
IndexOf(THeapElement)
|
Overloaded. Returns the index of the node in the heap. (Inherited from DataStructures.TCustomHeap.)
|
|
IndexOf(TObject)
|
Overloaded. Returns the index of the element in the heap that matches the specified item (with an assumed priority of 0). If they are not found, the function returns -1. (Overrides DataStructures.TCustomHeap.IndexOf(TObject).)
|
|
IndexOf(TObject,Integer)
|
Overloaded. Returns the index of the element in the heap that matches the specified item and priority. If they are not found, the function returns -1. (Inherited from DataStructures.TIntHeap.)
|
|
ModifyPriority(THeapElement)
|
Overloaded. Modifies the priority the heap element in the heap. The index of the element is returned. (Overrides DataStructures.TCustomHeap.ModifyPriority(THeapElement).)
|
|
ModifyPriority(THeapElement,Integer)
|
Overloaded. Modifies the priority the heap element at the specified index position in the heap. The new index of the element is returned. (Inherited from DataStructures.TIntHeap.)
|
|
Peek
|
Returns the object at the front of the queue. Call Peek to access the queue without removing an item. Peek returns the next item in the queue.
To remove an item from the queue, call DataStructures.TIntPriorityQueue.Pop.
|
|
Pop
|
Removes and returns the item at the front of the queue. Call Pop to retrieve an item from the queue. Pop removes the next item from the queue (that is, the next item based on priority and sort order), then returns the object of the deleted item.
To access the queue without removing an item, call DataStructures.TIntPriorityQueue.Peek .
|
|
Push(TObject,Integer)
|
Adds an item to the queue with a specified priority. Call Push to add an item to the queue.
To retrieve items added with Push, call DataStructures.TIntPriorityQueue.Pop or DataStructures.TIntPriorityQueue.Peek .
|
|
PushDown(Integer)
|
Push the Parent down the tree if it is smaller (according to Order) than one of its children
The DataStructures.TCustomHeap.PushUp(Integer) and DataStructures.TCustomHeap.PushDown(Integer) methods maintain the sort order of the heap. These methods are O(n) in efficiency.
|
|
PushUp(Integer)
|
Push the last value up the tree until it is not bigger (according to Order) than any of its parents.
The DataStructures.TCustomHeap.PushUp(Integer) and DataStructures.TCustomHeap.PushDown(Integer) methods maintain the sort order of the heap.
|
|
SetOrder(THeapOrder)
|
Represents method SetOrder(THeapOrder). (Inherited from DataStructures.TCustomHeap.)
|