Docs For Class Zend_Search_Lucene_PriorityQueue

## Class Zend_Search_Lucene_PriorityQueue

Description

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

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Search/Lucene/PriorityQueue.php (line 39)

Direct descendents

Class | Description
--- | ---
Zend_Search_Lucene_Index_SegmentInfoPriorityQueue |

Method Summary
void clear ()
mixed pop ()
void put (mixed $element)
mixed top ()
boolean _less (mixed $el1, mixed $el2)
Methods
clear (line 155)

Clear queue

- access: public

void clear ()
pop (line 107)

Removes and return least element of the queue

O(log(N)) time

- access: public

mixed pop ()
put (line 64)

Add element to the queue

O(log(N)) time

- access: public

void put (mixed $element)

- mixed $element

top (line 90)

Return least element of the queue

Constant time

- access: public

mixed top ()
_less (line 170)

Compare elements

Returns true, if $el1 is less than $el2; else otherwise

- access: protected
- abstract:

boolean _less (mixed $el1, mixed $el2)

- mixed $el1
- mixed $el2

Redefined in descendants as:

- Zend_Search_Lucene_Index_SegmentInfoPriorityQueue::_less() : Compare elements

Documentation generated on Sun, 29 Oct 2006 21:27:28 -0600 by phpDocumentor 1.3.0RC6