📜  NetworkX Dijkstra 的算法 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:01.840000             🧑  作者: Mango

代码示例1
>>> G=nx.path_graph(5)
>>> length,path=nx.bidirectional_dijkstra(G,0,4)
>>> print(length)
4
>>> print(path)
[0, 1, 2, 3, 4]