类 UpdateQueue
java.lang.Object
weka.clusterers.forOPTICSAndDBScan.Utils.UpdateQueue
- 所有已实现的接口:
RevisionHandler
UpdateQueue.java
Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht, Matthias Schubert
Date: Aug 27, 2004
Time: 5:36:35 PM
$ Revision 1.4 $
- 版本:
- $Revision: 1.3 $
- 作者:
- Matthias Schubert (schubert@dbs.ifi.lmu.de), Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de), Rainer Holzmann (holzmann@cip.ifi.lmu.de)
-
构造器概要
构造器构造器说明Creates a new PriorityQueue (backed on a binary heap) with the ability to efficiently update the priority of the stored objects in the heap. -
方法概要
修饰符和类型方法说明void
Adds a new Object to the queuedouble
getPriority
(int index) Returns the priority for the object at the specified indexReturns the revision string.boolean
hasNext()
Tests, if the queue has some more elements leftnext()
Returns the element with the lowest priorityint
size()
Returns the queue's size
-
构造器详细资料
-
UpdateQueue
public UpdateQueue()Creates a new PriorityQueue (backed on a binary heap) with the ability to efficiently update the priority of the stored objects in the heap. The ascending (!) queue is dynamically growing and shrinking.
-
-
方法详细资料
-
add
Adds a new Object to the queue- 参数:
priority
- The priority associated with the object (in this case: the reachability-distance)objectKey
- The key for this objecto
-
-
getPriority
public double getPriority(int index) Returns the priority for the object at the specified index- 参数:
index
- the index of the object- 返回:
- priority
-
size
public int size()Returns the queue's size- 返回:
- size
-
hasNext
public boolean hasNext()Tests, if the queue has some more elements left- 返回:
- true, if there are any elements left, else false
-
next
Returns the element with the lowest priority- 返回:
- next element
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-