(Available since version 1.0)
This class provides the main functionalities of a Heap. The underlying implementation is a pairing heap.
It provides the same interface as SplHeap with the extra method, 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::Pairing::MaxHeap and SEIDS::Heaps::Pairing::MinHeap for a pairing max-heap and pairing min-heap respectively.
$a
,
SEIDS::Heaps::Pairing::Subheap
$b
)The top node of the heap.
A hash table (standard PHP array) which takes node values (as given by Heap::hashtIndex()) as keys and gives a list of nodes (represented as SubHeap objects) and tags for nodes corresponding to that value. Used to efficiently update the heap.
The last tag used for a node.