Index
Help
1
2
3
4
5
6
7
s = PickVertex()
for
v
in
Neighborhood(s):
F.AddEdge((s,v))
pred[v] = s
while
not
T.IsSpanning():
(u,v) = F.MinimumEdge(weight)
F.DeleteEdge((u,v))
T.AddEdge((u,v))
for
w
in
Neighborhood(v):
if
weight[(pred[w],w)] > weight[(w,v)] \
and
not
T.Contains(w):
F.DeleteEdge((pred[w],w))
F.AddEdge((w,v))
pred[w] = v