|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFacemorph.multifilter.PQplus
public class PQplus
PQ which supports on-the-fly updates to values in the queue
Constructor Summary | |
---|---|
PQplus()
Default constructor |
|
PQplus(int maxsize)
Constructor with an initial capacity |
Method Summary | |
---|---|
void |
add(PQplusElement c)
Add an element to the heap |
void |
clear()
Empty the array, alternatively could reallocate |
PQplusElement |
inspectLeast()
Inspect but don't remove the smallest element |
boolean |
isEmpty()
Check if the heap is empty |
static void |
main(java.lang.String[] args)
Main method for testing |
PQplusElement |
removeLeast()
Remove the smallest element and return it |
int |
size()
Return the number of elements in the heap |
void |
update(PQplusElement c)
Alter the value of the element in place and adjust the PQ appropriately |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PQplus()
public PQplus(int maxsize)
maxsize
- the initial capacityMethod Detail |
---|
public PQplusElement inspectLeast()
public void clear()
public boolean isEmpty()
public int size()
public PQplusElement removeLeast()
public void add(PQplusElement c)
c
- the new element for insertionpublic void update(PQplusElement c)
c
- the element to adjustpublic static void main(java.lang.String[] args)
args
- the program arguments
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |