You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple of enhancements that may make heaps in this package more useful:
Allow the user to specify an Ordering (as is used by the Sort machinery in Base).
Make key-value pair storage possible/easy
The second proposal could be made possible by a specific Ordering, but would be more efficient if it were coded for in the data structure.
It may make sense to code these as separate data structures (I haven't looked at the code), implementing the AbstractHeap interface if that makes sense.
What's the relationship between the heaps in this package and the PriorityQueue / heap* operations in Base.Collections? They seem to have more or less the same functionality.
Activity
wsliang commentedon May 9, 2014
What's the relationship between the heaps in this package and the
PriorityQueue/heap*operations inBase.Collections? They seem to have more or less the same functionality.oxinabox commentedon Oct 31, 2017
The first is basically covered by / overlaps with #243
nsajko commentedon Oct 1, 2026
The first proposal is implemented nowadays: both
BinaryHeapandMutableBinaryHeapdepend onOrdering.The second proposal is not clear and does not feel actionable.
Closing.
nsajko commentedon Oct 1, 2026
PriorityQueuealso depends onOrdering, and explicitly stores both keys and values. So both proposals are, in fact, implemented.