|
Add(TObject)
|
Adds the item to the heap.
When an item is added to the heap. It is pushed up from the bottom of the heap (the tree) until it is not bigger (according to Order) than any of its parents.
|
|
Assign(TPersistent)
|
Represents method Assign(TPersistent).
|
|
Clear
|
Clears or empties the heap.
|
|
Delete(Integer)
|
Overloaded. 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.
|
|
GetCount
|
Returns the number of items in the heap
|
|
GetItem(Integer)
|
Returns the item in the heap at the specified position.
|
|
IndexOf(THeapElement)
|
Overloaded. Returns the index of the node in the heap.
|
|
IndexOf(TObject)
|
Overloaded. Finds an item in the heap and returns its index in the heap.
The heap is assumed to be sorted .
|
|
ModifyPriority(THeapElement)
|
Modifies the priority the heap element in the heap. The index of the element is returned.
|
|
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).
|