Priority Queue with Mutable Elements
Chris Lasher
chris.lasher at gmail.com
Sat Jun 16 10:52:45 EDT 2007
On Jun 15, 5:52 pm, Josiah Carlson <josiah.carl... at sbcglobal.net>
wrote:
> See this implementation of a "pair heap":
> http://mail.python.org/pipermail/python-dev/2006-November/069845.html
> ...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?
Thanks,
Chris
More information about the Python-list
mailing list