Index
Help
1
2
3
4
5
6
7
8
9
10
def
AddEdge(u,v):
C = component[u]
D = component[v]
MergeComponents(C,D)
for
w
in
Vertices(C):
component[w] = D
def
CreatingCircuit(u,v):
if
SameComponent(u,v):
return
True
else
:
return
False
E = Sort(Edges,byWeight)
for
(u,v)
in
E:
if
not
CreatingCircuit(u,v):
AddEdge(u,v)