|
BRUtil - Making Java a Kinder, Gentler, Place to be. |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--brutil.PriorityQueueRadix
| Constructor Summary | |
PriorityQueueRadix(int keySize)
|
|
| Method Summary | |
boolean |
decreaseKey(HandlePQ key,
int newKey)
Decreases the key value of the specified element. |
HandlePQ |
extractMin()
Extracts the object with the smallest key value from the array Then the array is traversed to find the next smallest key |
HandlePQ |
insert(int key,
java.lang.Object value)
Appends a wrapper object with the value and its key to a list in the array The key is used as the radix postion of the array. |
boolean |
isEmpty()
Returns true if the Priority Queue is empty |
HandlePQ |
min()
Returns the smallest key value in the Priority Queue |
java.lang.String |
toString()
Return a list of element stored inside the Priority Queue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PriorityQueueRadix(int keySize)
| Method Detail |
public HandlePQ insert(int key,
java.lang.Object value)
key - the key value of the objectvalue - the object to be stored in the queuepublic HandlePQ min()
public HandlePQ extractMin()
public boolean decreaseKey(HandlePQ key,
int newKey)
h - the HandlePQ whose key value needs to be modifiednewKey - the new valuepublic boolean isEmpty()
public java.lang.String toString()
toString in class java.lang.Object
|
BRUtil - Making Java a Kinder, Gentler, Place to be. |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||