x.append(i) y.append(saltoDos) z.append(saltoTres) weights.append(1) if saltoTres < (DIMENSION**3) and valores[int(saltoTres)] == 1.0: x.append(i) y.append(saltoTres) z.append(saltoTres) weights.append(1) """graf=g.Graph(x,y,weights, directed=False) graf.print_r()""" print("Dijkstra\n") tiempo_inicial = time() G = g.Graph(x,y,weights) G.create_network(x, y, weights) G.dijkstra() tiempo_final = time() tiempo_ejecucion = tiempo_final - tiempo_inicial print('El tiempo de ejecucion Dijkstra con dimension {0} y obstaculo {1} fue: {2} '.format(DIMENSION,OBSTACULOS,tiempo_ejecucion) ) G.print_distances() print("FloydWarshall\n") G1 = g.Graph(x,y,weights) G1.create_network(x, y, weights) G1.floyd_warshall() tiempo_final = time() tiempo_ejecucion = tiempo_final - tiempo_inicial print('El tiempo de ejecucion Floyd Warshall dimension {0} y obstaculo {1} fue: {2} '.format(DIMENSION,OBSTACULOS,tiempo_ejecucion))