PriorityQueue::processExtract

(Available since version 1.0)

PriorityQueue::processExtractProcesses a node according to the extraction mode

Description

protected mixed PriorityQueue::processExtract ( SEIDS::Heaps::PriorityQueueHeapItem $extract )

This method is called by PriorityQueue::current(), PriorityQueue::top() and PriorityQueue::extract(). It is used to process nodes according to the extraction mode.

In the case of PriorityQueue::EXTR_DATA only the data is returned. In the case of PriorityQueue::EXTR_PRIORITY only the priority is returned. Finally, in the case of PriorityQueue::EXTR_BOTH an array containing both the data and the priority is returned.

Parameters

extract

The node to be processed.

Return Values

The node's data, priority or an array of both depending on the extraction mode.

To Top