java priority queue
807603Nov 26 2007 — edited Dec 6 2007Java provides PriorityQueue, and I have gone through its API.
The implementation of PriorityQueue in Java does not provide method for increase or decrease key,
and there must be a reason for it.
But, when i go through books on data strucutre, a lot of them talk about the increase/decrease key function
of the PriorityQueue.
So I am just wondering, why is it that increase/decrease function not provided in PriorityQueue. I cannot come up with a reason for it, but i think there must be. Does anybody have any thought on this. Or is it just
because the designers thought its not needed?
I checked the source for the Priority Queue and the heapify() method was declared private.