#3016 closed Bugs (worksforme)
kolmogorov_max_flow() example does not compile
Reported by: | 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 , 13 years ago
Component: | None → graph |
---|---|
Owner: | set to |
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
comment:4 by , 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 , 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.
Which example are you trying? The kolmogorov-eg.cpp file in libs/graph/example works for me.