2016-03-02 29 views
0

我試圖在有向圖中找到兩個節點之間的k個最短路徑。爲此我運行下面的代碼片段:graph-tool -k-最短路徑 - 編譯時未找到boost :: coroutine

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 

任何想法,爲什麼這可能是這樣,我怎麼能解決問題呢?

回答

0

這是Debian中的一個bug,而不是圖形工具。它已被報告 和修復:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802509

+0

我運行Ubuntu 14.04。我認爲這裏還沒有解決呢? –

+0

我不這麼認爲。一個開放的錯誤報告在這裏:https://bugs.launchpad.net/ubuntu/+source/boost-defaults/+bug/1529289 –