Modify

Opened 4 months ago

#13374 new Bugs

Boykov Kolmogorov warning with float

Reported by: cyril.novel@… Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

In boykov_kolmogorov_max_flow.hpp, some values put in property_map are integer :

l.176             put(m_res_cap_map, from_source, 0);
l.190              put(m_dist_map, current_node, 1);
l.196              put(m_res_cap_map, to_sink, 0);
l.202              put(m_dist_map, current_node, 1);
l.208              put(m_res_cap_map, from_source, 0);
l.217            put(m_dist_map, current_node, 1);
l.228            put(m_dist_map, current_node, 1);

It causes a C4244 warning in property_map/property_map.hpp (l.310) when using floating distance and floating cost. An easy way to prevent this is to patch as follow:

l.176             put(m_res_cap_map, from_source, tEdgeVal(0));
l.190              put(m_dist_map, current_node, tDistanceVal(1));
l.196              put(m_res_cap_map, to_sink, tEdgeVal(0));
l.202              put(m_dist_map, current_node, tDistanceVal(1));
l.208              put(m_res_cap_map, from_source, 0);
l.217            put(m_dist_map, current_node, tDistanceVal(1));
l.228            put(m_dist_map, current_node, tDistanceVal(1));

Compiler: VS2017

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Jeremiah Willcock.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.