[BGL] push_relabel_max_flow

Hello, I tried to rewrite the example for push relable max flow on http://www.boost.org/libs/graph/doc/push_relabel_max_flow.html, it currently looks like this: #include <boost/config.hpp> #include <iostream> #include <string> #include <utility> #include <boost/graph/push_relabel_max_flow.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graph_utility.hpp> #include <boost/property_map.hpp> using namespace boost; typedef adjacency_list_traits<vecS, vecS, directedS> Traits; struct Vertex { std::size_t index; boost::default_color_type color; }; struct Edge { long capacity_0K; long capacity; long residual_capacity; Traits::vertex_descriptor edge_reverse; }; int main(int , char* []) { typedef adjacency_list<vecS, vecS, directedS, Edge, Vertex> Graph; Graph g; Traits::vertex_descriptor s, t; long flow; flow=push_relabel_max_flow(g, s, t, get(&Edge::capacity,g), get(&Edge::residual_capacity,g), get(&Edge::edge_reverse,g), get(&Vertex::index, g)); return 0; } It does not compile (the IDE jumps to line 681 in push_relabel_max_flow.hpp), and I do not see from the code examples that are availiable on the internet what exactly should be done differently and why. Sadly bundled properties are seldom used in availiable examples, although the documentation encourages their use. Thank you!
participants (1)
-
André Loose