
Please post in plain text in the future. HTML-formatted messages are hard to read in some e-mail readers. On Dec 22, 2004, at 5:35 AM, Matthias Linkenheil wrote:
template <typename EdgeCapacityMap> struct positive_edge_capacity { positive_edge_capacity() { } positive_edge_capacity(EdgeCapacityMap capacity) : m_capacity(capacity) { } template <typename Edge> bool operator()(const Edge& e) const { return 0 < boost::get(m_capacity, e); } EdgeCapacityMap m_capacity; }; ...
typedef adjacency_list_traits
Traits; typedef property VertexProperties; typedef property > > EdgeProperties; typedef adjacency_list Graph; typedef graph_traits<Graph>::edge_descriptor edge_descriptor; typedef graph_traits<Graph>::vertex_descriptor vertex_descriptor; const int V = x_size*y_size; Graph g(V); property_map
::type vid = get(vertex_index, g); property_map ::type cap = get(edge_capacity, g); property_map ::type rev_edge = get(edge_reverse, g); property_map ::type res_cap = get(edge_residual_capacity, g); ... edmunds_karp_max_flow(g, s, t); ...
Probably okay so far...
positive_edge_capacity<cap> filter(get(edge_capacity, g)); filtered_graph
fg(g, filter);
I'm assuming you get an error here? That's because "cap" is an object,
not a type, so you can't use it in a template. You'll need to get the
type of it first:
typedef property_map
participants (2)
-
Douglas Gregor
-
Matthias Linkenheil