9. Anexos.
9. Anexos.
9. Anexos.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
For i = 2 To UBound(Entrada())<br />
Buscar_En_Conjunto i, Entrada(), SolucionMST()<br />
Next i<br />
Depura_MST SolucionMST()<br />
Entrada = SolucionMST<br />
End Sub<br />
Private Function Partition(ByRef A() As Reg_Arcos, ByVal Lb As Long, ByVal Ub As Long) As Long<br />
Dim Temp As Reg_Arcos<br />
Dim pivot As Reg_Arcos<br />
Dim i As Long<br />
Dim j As Long<br />
Dim p As Long<br />
p = Lb + (Ub - Lb) \ 2<br />
pivot = A(p)<br />
A(p) = A(Lb)<br />
i = Lb + 1<br />
j = Ub<br />
Do<br />
Do While i < j<br />
If pivot.Longitud = i<br />
If A(j).Longitud = j Then Exit Do<br />
Temp = A(i)<br />
A(i) = A(j)<br />
A(j) = Temp<br />
j = j - 1<br />
i = i + 1<br />
Loop<br />
<strong>Anexos</strong>.<br />
29