Opened 15 years ago
Closed 14 years ago
#1009 closed Bugs (fixed)
Improper overflow handling in shortest paths algorithms
Reported by: | Douglas Gregor | Owned by: | Jeremiah Willcock |
---|---|---|---|
Milestone: | Boost 1.34.1 | Component: | graph |
Version: | Boost 1.34.0 | Severity: | Problem |
Keywords: | Cc: |
Description
As reported here
the Bellman-Ford shortest paths algorithm fails to compute correct results in some graphs containing negative cycles. The cause of the problem is the incorrect overflow handling in closed_plus, which is used to relax edges in the graph. The attached patch fixes the problem.
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | bellman-ford-neg-cycle.patch added |
---|
comment:1 by , 15 years ago
Milestone: | → Boost 1.34.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This solution breaks the floyd_warshall_all_pairs_shortest_paths (which uses this as the default BinaryPredicate) in the case that one of the parameters is infinity and the other parameter is a negative number.
comment:3 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:4 by , 14 years ago
Status: | new → assigned |
---|
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fix handling of overflow