(Available since version 1.0)
This class provides the main functionalities of a Heap. The underlying implementation is a binary heap.
It provides the same interface as SplHeap with the extra methods, Heap::extractInsert() and Heap::update() which allows one to update a node in the heap.
This class has just one abstract method, Heap::compare(), that must by overloaded to use the heap. Those who are working with simple numerical data can used the concrete classes SEIDS::Heaps::Binary::MaxHeap and SEIDS::Heaps::Binary::MinHeap for a binary max-heap and binary min-heap respectively.
The binary tree which represents the heap.
A hash table (standard PHP array) which takes node values (as
given by Heap::hashtIndex()) as keys and gives a
list of indexes (in btree
) and tags for
nodes corresponding to that value. Used to efficiently update
the heap.
The last tag used for a node.