Priority Queue with Mutable Elements

Chris Lasher chris.lasher at
Sat Jun 16 16:52:45 CEST 2007

On Jun 15, 5:52 pm, Josiah Carlson <josiah.carl... at>
> See this implementation of a "pair heap":
> ...which offers the ability to update the 'priority' of an entry in the
> heap.  It requires that the 'value' in (priority, value) pairs be unique
> (to the heap) and hashable.
>   - Josiah

Hmm. I won't be able to use that heap, as I can guarantee that the
value will be identical for two nodes when they have edges to each
other and no other nodes. Any suggestions on structures that can
accompany identical priority values?


More information about the Python-list mailing list