Abstract 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) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

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


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

Clear queue

  • access: public
void clear ()
pop (line 105)

Removes and return least element of the queue

O(log(N)) time

  • access: public
mixed pop ()
put (line 62)

Add element to the queue

O(log(N)) time

  • access: public
void put (mixed $element)
  • mixed $element
top (line 88)

Return least element of the queue

Constant time

  • access: public
mixed top ()
_less (line 168)

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:

Documentation generated on Wed, 21 Feb 2007 11:57:51 -0800 by phpDocumentor 1.3.1