Heap::extract

(Available since version 1.0)

Heap::extractExtracts a node from top of the heap

Description

public mixed Heap::extract ( void )

Extracts a node from top of the heap and sifts up. Runs in Θ(log(n)) amortized time, where n is the size of the heap.

Parameters

This function has no parameters.

Return Values

The value of the extracted node.

Errors/Exceptions

Throws SEIDS::Heaps::ExtractException when the data-structure is empty.

To Top