Boost C++ Libraries: Ticket #10805: Bugs: problem in push_relabel_max_flow algorithm when using std::numeric_limits<double>::max() as capacity in some edges https://svn.boost.org/trac10/ticket/10805 <blockquote> <p> I am having trouble using the push_relabel_max_flow algorithm when I put std::numeric_limits&lt;double&gt;::max() as capacity attribute in some edges. </p> </blockquote> <p> is there a maximum value that I can use as capacities. which ?. </p> <p> I adjunct an example that reproduces the error: </p> <blockquote> <p> /home/madoery/boost_1_55_0/boost/graph/push_relabel_max_flow.hpp:750: typename boost::property_traits&lt;<a class="missing wiki">CapacityEdgeMap</a>&gt;::value_type boost::push_relabel_max_flow(Graph&amp;, typename boost::graph_traits&lt;Graph&gt;::vertex_descriptor, typename boost::graph_traits&lt;Graph&gt;::vertex_descriptor, <a class="missing wiki">CapacityEdgeMap</a>, <a class="missing wiki">ResidualCapacityEdgeMap</a>, <a class="missing wiki">ReverseEdgeMap</a>, <a class="missing wiki">VertexIndexMap</a>) [with Graph = boost::adjacency_list&lt;boost::vecS, boost::vecS, boost::bidirectionalS, vertexInfo, edgeInfo&gt;, <a class="missing wiki">CapacityEdgeMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, double, double&amp;, long unsigned int, edgeInfo, double edgeInfo::*&gt;, <a class="missing wiki">ResidualCapacityEdgeMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, double, double&amp;, long unsigned int, edgeInfo, double edgeInfo::*&gt;, <a class="missing wiki">ReverseEdgeMap</a> = boost::adj_list_edge_property_map&lt;boost::bidirectional_tag, boost::detail::edge_desc_impl&lt;boost::bidirectional_tag, long unsigned int&gt;, boost::detail::edge_desc_impl&lt;boost::bidirectional_tag, long unsigned int&gt;&amp;, long unsigned int, edgeInfo, boost::detail::edge_desc_impl&lt;boost::bidirectional_tag, long unsigned int&gt; edgeInfo::*&gt;, <a class="missing wiki">VertexIndexMap</a> = boost::vec_adj_list_vertex_id_map&lt;vertexInfo, long unsigned int&gt;, typename boost::property_traits&lt;<a class="missing wiki">CapacityEdgeMap</a>&gt;::value_type = double, typename boost::graph_traits&lt;Graph&gt;::vertex_descriptor = long unsigned int]: Assertion `algo.is_flow()' failed. </p> </blockquote> <p> On the other side, <a class="ext-link" href="http://lists.boost.org/Archives/boost/2011/01/174683.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2011/01/174683.php</a> treats the problem of using double precision as capacity attributes on the edges. Jeremiah Willcock advices to just replace the == and != operations in is_flow (and not &lt; and &gt;) and asks if the code works correctly in that case. I made the replacement but I had to use precision (epsilon) too high (in the order of 0.2, 0.3) to make the BOOST_ASSERT(algo.is_flow()) to pass. </p> <p> Maybe these are two different problems or not. I am not sure, but they seems to be regarding the same assert that is failing </p> <p> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10805 Trac 1.4.3 Pablo Madoery <madoerypablo@…> Wed, 19 Nov 2014 15:31:02 GMT attachment set https://svn.boost.org/trac10/ticket/10805 https://svn.boost.org/trac10/ticket/10805 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">main.cpp</span> </li> </ul> <p> It makes a graph that have problematic attributes on the esges </p> Ticket viboes Fri, 13 Feb 2015 18:32:27 GMT component changed; owner set https://svn.boost.org/trac10/ticket/10805#comment:1 https://svn.boost.org/trac10/ticket/10805#comment:1 <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