Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Abstract Priority Queue
It implements a priority queue. Please go to "Data Structures and Algorithms", Aho, Hopcroft, and Ullman, Addison-Wesley, 1983 (corrected 1987 edition), for implementation details.
It provides O(log(N)) time of put/pop operations, where N is a size of queue

_less(
mixed $el1, mixed $el2
)
:
boolean
Compare elements
Returns true, if $el1 is less than $el2; else otherwise
Name | Type | Description |
---|---|---|
$el1 | mixed | |
$el2 | mixed |
Type | Description |
---|---|
boolean |

pop(
)
:
mixed
Removes and return least element of the queue
O(log(N)) time
Type | Description |
---|---|
mixed |

put(
mixed $element
)
:
void
Add element to the queue
O(log(N)) time
Name | Type | Description |
---|---|---|
$element | mixed |