|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jutil.java.collections.SkipListPQ
A SkipList based priority queue
Field Summary | |
static java.lang.String |
CVS_REVISION
|
Constructor Summary | |
SkipListPQ(java.util.Comparator comparator)
public behavior post size() == 0; post getComparator() == comparator; Initialize a new SkipListPQ with the given comparator. |
Method Summary | |
void |
add(java.lang.Object element)
See superclass. |
void |
clear()
See superclass. |
java.util.Comparator |
getComparator()
See superclass. |
boolean |
isEmpty()
See superclass. |
java.lang.Object |
min()
See superclass. |
int |
nbExplicitOccurrences(java.lang.Object element)
See superclass. |
java.lang.Object |
pop()
See superclass. |
int |
size()
See superclass. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CVS_REVISION
Constructor Detail |
public SkipListPQ(java.util.Comparator comparator)
comparator
- The comparator that is used to determine the order
of the added elements.Method Detail |
public void add(java.lang.Object element)
See superclass.
average: O(log(n))
worst case: O(n)
add
in interface PriorityQueue
org.jutil.java.collections.PriorityQueue
element
- The object to be added.public java.lang.Object min()
See superclass.
O(1)
min
in interface PriorityQueue
public java.lang.Object pop()
See superclass.
O(1)
pop
in interface PriorityQueue
public boolean isEmpty()
See superclass.
isEmpty
in interface PriorityQueue
public int nbExplicitOccurrences(java.lang.Object element)
See superclass.
nbExplicitOccurrences
in interface PriorityQueue
org.jutil.java.collections.PriorityQueue
element
- The object of which the number of explicit occurrences is requested.public int size()
See superclass.
size
in interface PriorityQueue
public java.util.Comparator getComparator()
See superclass.
getComparator
in interface PriorityQueue
public void clear()
See superclass.
clear
in interface PriorityQueue
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |