This pseudocode is referred to the Florian's lecture.
term:
V = vertex, pq = priority queue, St = staring node, Sp = predecessor, C = unvisited vertex, W = weight
-
for each vertex V:
initialize V's visited mark to false
-
create minimum priority queue, pq, for vertices
-
pq.insert( [St: Sp, 0 ])
St = starting node, Sp = predeccessor node
-
while ( !pq.isEmpty() ):
[ C: Pred, Distance ] = pq.removeMinPathWeight()
if C is unvisited:
-
mark C as Visited, set predecessor to Previous Vertex, and cost to Distance in the graph
-
for each edge with weight W to unvisited successor(US) of C:
pq.insert( [ US: C, Distance + W ] )
This image of a cute kitten is from a Medium post:An Introduction to Dijkstra’s Algorithm: Theory and Python Implementation