API Documentation

Search/Lucene/Index/TermsPriorityQueue.php

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.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Search_Lucene  
subpackage
Index  
version
$Id: TermsPriorityQueue.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Search_Lucene_Index_TermsPriorityQueue

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

Extends from
\Zend_Search_Lucene_PriorityQueue
category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Search_Lucene  
subpackage
Index  

Methods

methodprotected_less( mixed $termsStream1, mixed $termsStream2 ) : boolean

Compare elements

Returns true, if $termsStream1 is "less" than $termsStream2; else otherwise

Parameters
Name Type Description
$termsStream1 mixed
$termsStream2 mixed
Returns
Type Description
boolean
methodpublicclear( ) : void

Clear queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::clear()
methodpublicpop( ) : mixed

Removes and return least element of the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::pop()

O(log(N)) time

Returns
Type Description
mixed
methodpublicput( mixed $element ) : void

Add element to the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::put()

O(log(N)) time

Parameters
Name Type Description
$element mixed
methodpublictop( ) : mixed

Return least element of the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::top()

Constant time

Returns
Type Description
mixed
Documentation was generated by DocBlox 0.13.3.