我试图在我的有向图中找到两个节点之间的 k 个最短路径。为此,我运行以下代码片段:
g = load_graph('graph.xml')
source = find_vertex(g,g.vp.xrn, '774123')
source = source[0]
target = find_vertex(g,g.vp.xrn,'636131')
target = target[0]
for path in all_shortest_paths(g,source,target):
print path
这将返回以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/graph_tool/topology/__init__.py", line 1532, in all_shortest_paths
_prop("v", g, all_preds_map))
RuntimeError: This functionality is not available because boost::coroutine was not found at compile-time
关于为什么会出现这种情况以及如何解决问题的任何想法?