PriorityQueue::extractInsert

(Available since version 1.0)

PriorityQueue::extractInsertExtracts a node from top of the queue and inserts a new one

Description

public mixed PriorityQueue::extractInsert ( mixed $value , mixed $priority )

Extracts a node from top of the queue and inserts value with priority priority.

Parameters

value

The value to insert.

priority

The associated priority.

Return Values

The value or priority (or both) of the extracted node, depending on the extract flag.

Errors/Exceptions

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

To Top