Index
Help
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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)