I am a newbie to boost.
I am trying to build a graph and to compute the max_flow using
boost/graph/kolomogorov_max_flow.hpp.
Blow is my code:
-------------------------------------------------------------CODE-------------------------------------------------------------------------------
#include
Graph;
typedef graph_traits <Graph>::edge_descriptor edge_descriptor;
typedef Traits::vertex_descriptor vertex_descriptor;
typedef std::pair
I am trying to build a graph and to compute the max_flow using boost/graph/kolomogorov_max_flow.hpp.
That's quite an error message. I'm not entirely sure what's going wrong
(besides the missing function call), but there are a couple of problems with
your program.
First, you should not be using the old-style properties to define your
graph. Use bundled properties. It's much cleaner and generates shorter error
messages since it can avoid the recursive templates. See here:
http://www.boost.org/doc/libs/1_36_0/libs/graph/doc/bundles.html. If you
didn't find this in the documentation, don't worry. It's not very easy to
find.
Second, you're trying to mix descriptors from two kinds of graphs (Traits
and Graph). While this may compile some of the time, you shouldn't be doing
it. If you're going to use bundled properties, you can set up your graph
like this:
struct Node;
struct Arc;
typedef adjacency_list
participants (2)
-
Andrew Sutton
-
Lior Weizman