I know it is possible to realize decrease-key functionality in O(log n) but I don\'t know how?
Decrease-key is a must-have operation for many algorithms (Dijkstra's Algorithm, A*, OPTICS), i wonder why Python's built-in priority queue does not support it.
Unfortunately, i wasn't able to download math4tots's package.
But, i was able to find this implementation by Daniel Stutzbach. Worked perfectly for me with Python 3.5.
hd = heapdict()
hd[obj1] = priority
hd[obj1] = lower_priority
# ...
obj = hd.pop()