Search/Lucene/Index/TermsPriorityQueue.php

Show: PublicProtectedPrivateinherited
Table of Contents
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Index  
Version
$Id: TermsPriorityQueue.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_Search_Lucene_Index_TermsPriorityQueue

Package: Zend\Search\Lucene\Index
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

Parent(s)
\Zend_Search_Lucene_PriorityQueue
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprivatearray $_heap = array()
inherited
Queue heap
Inherited from: \Zend_Search_Lucene_PriorityQueue::$$_heap

Heap contains balanced partial ordered binary tree represented in array [0] - top of the tree [1] - first child of [0] [2] - second child of [0] ... [2n + 1] - first child of [n] [2n + 2] - second child of [n]

Default valuearray()Details
Type
array
Inherited_from
\Zend_Search_Lucene_PriorityQueue::$$_heap  

Methods

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

Compare elements

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

Parameters
NameTypeDescription
$termsStream1mixed
$termsStream2mixed
Returns
TypeDescription
boolean
methodpublicclear() : void
inherited

Clear queue

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

Removes and return least element of the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::pop()

O(log(N)) time

Returns
TypeDescription
mixed
methodpublicput(mixed $element) : void
inherited

Add element to the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::put()

O(log(N)) time

Parameters
NameTypeDescription
$elementmixed
methodpublictop() : mixed
inherited

Return least element of the queue

Inherited from: \Zend_Search_Lucene_PriorityQueue::top()

Constant time

Returns
TypeDescription
mixed
Documentation was generated by phpDocumentor 2.0.0a12.