Ported heap to heapdict in dijkstra implementation