for each u ∈ G.V
u.key = ∞
u.pred = nil
r.key = 0
Q = G.V
while Q ≠ ∅
u = ExtractMin(Q)
for each v ∈ G.Adj[u]
if v ∈ Q and w(u,v) < v.key
v.pred = u
v.key = w(u,v)
|
|