for the updating part,
for all neighbors w of u:
if dist[w] > dist[u] + l(u,w)
dist[w] = dist[u] + l(u,w)
prev[w] = u
decreasekey(H,w)
Here, w is the ID of the node, I think it should be like pair(ID,key) which key is the dist[ID]. If so, finding the node with ID w on a priority queue should cost O(N) time rather than O(logN) time. Then, why is decreasekey in Dijkstra's algorithm takes O(logN) time?