9. Anexos.
9. Anexos.
9. Anexos.
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
NodosAdy(Vector(j).Destino).numero = NodosAdy(Vector(j).Destino).numero + 1<br />
ReDim Preserve NodosAdy(Vector(j).Destino).Mady(NodosAdy(Vector(j).Destino).numero)<br />
NodosAdy(Vector(j).Destino).Mady(NodosAdy(Vector(j).Destino).numero).Nodo = Vector(j).Origen<br />
If CalcularPosicion = True Then<br />
NodosAdy(Vector(j).Origen).Mady(NodosAdy(Vector(j).Origen).numero).Posicion = j<br />
NodosAdy(Vector(j).Destino).Mady(NodosAdy(Vector(j).Destino).numero).Posicion = j<br />
End If<br />
Next<br />
End Sub<br />
Sub Dijkstra(ByVal Origen As Long, ByVal NumeroNodos As Long, ByRef D() As Single)<br />
Dim i As Integer, j As Integer<br />
Inicializa_Matrices Origen, NumeroNodos, D()<br />
For i = 1 To UBound(Mat_C)<br />
j = Elige_Menor(Origen)<br />
Iteracion_Algoritmo j, Origen, D()<br />
Next<br />
End Sub<br />
Sub Inicializa_Matrices(ByVal Origen As Long, ByVal NumeroNodos As Long, ByRef D() As Single)<br />
Dim l As Long<br />
Dim i As Integer, j As Integer, k As Integer<br />
ReDim Mat_C(NumeroNodos - 1)<br />
i = 1<br />
j = 1<br />
While i