Skip to Content

chemin le plus court ( H, graphe non orienté)

# recherche du plus court chemin
print(nx.astar_path(H,(1.0, 4.0),(4.0, 2.0),dist))
[(1.0, 4.0), (1.0, 3.0), (1.0, 2.0), (2.0, 3.0), (3.0, 2.0), (4.0, 2.0)]