Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3016 closed Bugs (worksforme)

kolmogorov_max_flow() example does not compile

Reported by: kigurai@… Owned by: Jeremiah Willcock
Milestone: Boost 1.40.0 Component: graph
Version: Boost 1.38.0 Severity: Problem
Keywords: Cc:

Description

The current documentation (version 1.39.0) for kolmogorov_max_flow gives an example where the function is called as:

flow = kolmogorov_max_flow(g, s, t);

But there is no function that accepts that kind of parameters, and when I tried to compile it spat out a load of compile errors.

I solved it by chaning/adding the following:

We need a "IndexMap" for the graph property_map<Graph, vertex_index_t>::type

index_map = get(vertex_index, g);

flow = kolmogorov_max_flow(g, capacity, residual_capacity, rev, index_map, s, t);

Change History (5)

comment:1 by Steven Watanabe, 13 years ago

Component: Nonegraph
Owner: set to Douglas Gregor

comment:2 by Jeremiah Willcock, 13 years ago

Owner: changed from Douglas Gregor to Jeremiah Willcock
Status: newassigned

comment:3 by Jeremiah Willcock, 13 years ago

Resolution: worksforme
Status: assignedclosed

Which example are you trying? The kolmogorov-eg.cpp file in libs/graph/example works for me.

comment:4 by anonymous, 13 years ago

The example I am referring to is at the bottom of the documentation at http://www.boost.org/doc/libs/1_39_0/libs/graph/doc/kolmogorov_max_flow.html

comment:5 by Jeremiah Willcock, 13 years ago

Sorry about that -- the docs have a copy of kolmogorov-eg.cpp that doesn't work, but the one in the example directory does. I fixed the docs in r52994.

Note: See TracTickets for help on using tickets.