Boost C++ Libraries: Ticket #11659: push_relabel_max_flow https://svn.boost.org/trac10/ticket/11659 <p> if you use the code below the bug would be happened: </p> <pre class="wiki">#include &lt;iostream&gt; #include &lt;boost/config.hpp&gt; #include &lt;boost/graph/boykov_kolmogorov_max_flow.hpp&gt; #include &lt;boost/graph/push_relabel_max_flow.hpp&gt; #include &lt;boost/graph/edmonds_karp_max_flow.hpp&gt; #include &lt;boost/graph/adjacency_list.hpp&gt; #include &lt;boost/graph/read_dimacs.hpp&gt; #include &lt;boost/graph/graph_utility.hpp&gt; /* , boost::property &lt;boost::vertex_color_t, boost::default_color_type, boost::property &lt;boost::vertex_distance_t, long, boost::property &lt;boost::vertex_predecessor_t, Traits::edge_descriptor &gt; &gt; &gt; */ typedef boost::adjacency_list_traits&lt;boost::vecS, boost::vecS, boost::directedS&gt; Traits; typedef boost::adjacency_list&lt;boost::listS, boost::vecS, boost::directedS, boost::property &lt; boost::vertex_name_t, std::pair&lt;int,int&gt;, boost::property &lt; boost::vertex_color_t, boost::default_color_type, boost::property &lt; boost::vertex_distance_t, long, boost::property &lt; boost::vertex_predecessor_t, Traits::edge_descriptor &gt; &gt; &gt; &gt;, boost::property &lt; boost::edge_capacity_t, double, boost::property &lt; boost::edge_residual_capacity_t, double, boost::property &lt; boost::edge_reverse_t, Traits::edge_descriptor&gt; &gt; &gt; &gt; Graph; void AddEdge( Traits::vertex_descriptor &amp;v1, Traits::vertex_descriptor &amp;v2, boost::property_map &lt; Graph, boost::edge_reverse_t &gt;::type &amp;rev, const double capacity, Graph &amp;g) { Traits::edge_descriptor e1 = boost::add_edge(v1, v2, g).first; Traits::edge_descriptor e2 = boost::add_edge(v2, v1, g).first; boost::put(boost::edge_capacity, g, e1, capacity); boost::put(boost::edge_capacity, g, e2, capacity); rev[e1] = e2; rev[e2] = e1; } int main(int argc, char* argv[]) { Graph g; boost::property_map &lt; Graph, boost::edge_reverse_t &gt;::type rev = get(boost::edge_reverse, g); std::pair&lt;int, int&gt; point1(0, 0); std::pair&lt;int, int&gt; point2(1, 0); std::pair&lt;int, int&gt; point3(1, 1); std::pair&lt;int, int&gt; point4(0, 1); Graph::vertex_descriptor u = boost::add_vertex(point1, g); Graph::vertex_descriptor v = boost::add_vertex(point2, g); Graph::vertex_descriptor w = boost::add_vertex(point3, g); Graph::vertex_descriptor x = boost::add_vertex(point4, g); //boost::add_edge(u, v, g); AddEdge(u, v, rev, 10.1, g); AddEdge(u, w, rev, 10.2, g); AddEdge(v, x, rev, 8.1, g); AddEdge(w, x, rev, 6.2, g); //double flow = boost::boykov_kolmogorov_max_flow(g, u, x); double flow = boost::push_relabel_max_flow(g, u, x); //double flow = boost::edmonds_karp_max_flow(g, u, x); boost::property_map &lt; Graph, boost::vertex_color_t &gt;::type vertex_color = get(boost::vertex_color, g); boost::graph_traits &lt; Graph &gt;::vertex_iterator u_iter, u_end; for (boost::tie(u_iter, u_end) = vertices(g); u_iter != u_end; ++u_iter) { std::cout &lt;&lt; "ver: " &lt;&lt; *u_iter &lt;&lt; " " &lt;&lt; vertex_color[*u_iter] &lt;&lt; std::endl; } return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11659 Trac 1.4.3 www.362783516@… Wed, 16 Sep 2015 06:07:47 GMT <link>https://svn.boost.org/trac10/ticket/11659#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11659#comment:1</guid> <description> <p> if you change the code the bug would not be happened <a class="missing wiki">AddEdge</a>(u, v, rev, 8.1, g); <a class="missing wiki">AddEdge</a>(u, w, rev, 6.2, g); <a class="missing wiki">AddEdge</a>(v, x, rev, 10.1, g); <a class="missing wiki">AddEdge</a>(w, x, rev, 10.2, g); I don't know why. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 17 Sep 2015 02:43:33 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/11659#comment:2 https://svn.boost.org/trac10/ticket/11659#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Jeremiah Willcock</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">graph</span> </li> </ul> Ticket murrayc@… Tue, 09 Aug 2016 07:50:17 GMT <link>https://svn.boost.org/trac10/ticket/11659#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11659#comment:3</guid> <description> <p> It would be helpful if you described what bug you are experiencing. For instance, what you expect to happen, and what actually happens. </p> </description> <category>Ticket</category> </item> </channel> </rss>