简体   繁体   English

Python:Networkx获取具有节点和边的给定两个节点之间的路径

[英]Python: Networkx get path between given two nodes with nodes and edges

Is there any function to get the list of all paths which will consist of nodes and the edges between any two given nodes from a graph? 是否有任何功能可以获取所有路径列表,该列表将包含节点以及图形中任意两个给定节点之间的边?

Functions like dijkstra_path() and shortest_path() etc return only nodes. 像功能dijkstra_path()shortest_path()等只返回节点。

I think you're looking for the get_edge_data() function. 我认为您正在寻找get_edge_data()函数。 Check the page for examples how to use it. 检查页面以获取有关如何使用它的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM