Hi Jeremy, On 01/12/2011 10:48 PM, jeremy wrote:
I'm looking to use graph-tool for some work involving percolation theory. So far it is a clear preference over the alternatives (networkx, etc).
BUT, I have just tried to use the max flow algorithms with the following result:
File "/usr/lib/python2.7/site-packages/graph_tool/flow/__init__.py", line 238, in push_relabel_max_flow _prop("e", g, residual)) RuntimeError: No static implementation was found for the desired routine. This is a graph_tool bug. :-( Please follow but report instructions at http://graph-tool.skewed.de. What follows is debug information.
Graph view: boost::UndirectedAdaptor<boost::filtered_graph<boost::adjacency_list<boost::vecS,
[...]
All of the max flow methods return this exception. Is there something wrong with my set-up? Or is this a genuine bug? Max flow is critical to my project and I would prefer not to sacrifice speed and use networkx.
Oops, this is indeed a bug. It seems I have restricted the C++ code to directed graphs only, and forgot to add a check in the python side of things. I'll do this shortly. Note however that you cannot use the max-flow algorithms in graph-tool (which come from the BGL) to calculate the max-flow of undirected graphs, since they are all formulated for directed graphs only (see http://lists.boost.org/boost-users/2005/03/10724.php). If you are really sure you want to do this for undirected graphs (the max-flow problem is usually posed for directed graphs), I guess your best option is to transform it into a directed graph with duplicated edges going in both directions... Cheers, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>