A priority queue oriented, binary heap class

(Available since version 1.0)

Introduction

This class represents the heap used in, and forming the basis of, the SEIDS::Heaps::Binary::PriorityQueue class.

Note:

This class is not intended for public consumption. Most users should instead be using the SEIDS::Heaps::Binary::PriorityQueue class itself.

Class synopsis

SEIDS::Heaps::Binary::PriorityQueueHeap extends SEIDS::Heaps::Binary::Heap {
/* Properties */
/* Inherited properties */
protected int $size ;
protected array $btree ;
protected array $hasht ;
protected int $last_tag ;
/* Methods */
public __construct ( callable $callback_compare )
protected int compare ( mixed $value1 , mixed $value2 )
protected mixed value ( SEIDS::Heaps::PriorityQueueHeapItem $value )
/* Inherited methods */
public int Heap::count ( void )
public mixed Heap::current ( void )
public bool Heap::isEmpty ( void )
public int Heap::key ( void )
public void Heap::next ( void )
public void Heap::rewind ( void )
public bool Heap::valid ( void )
protected mixed Heap::hashtIndex ( mixed $value )
public mixed Heap::extract ( void )
public mixed Heap::extractInsert ( mixed $value )
public bool Heap::insert ( mixed $value )
public bool Heap::recoverFromCorruption ( void )
public mixed Heap::top ( void )
public void Heap::update ( mixed $value1 , mixed $value2 )
protected int Heap::parentIndex ( int $index )
protected int Heap::childOneIndex ( int $index )
protected int Heap::childTwoIndex ( int $index )
protected void Heap::swap ( int $a , int $b )
protected void Heap::siftDown ( int $index )
protected void Heap::siftUp ( int $index )
}

Properties

callback_compare

A callback to use for the PriorityQueueHeap::compare() method.

See Also

Table of Contents

To Top