Opened 15 years ago
Closed 14 years ago
#1700 closed Patches (fixed)
graph/floyd_warshall_shortest.hpp.patch
Reported by: | Owned by: | Douglas Gregor | |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | graph |
Version: | Boost 1.34.1 | Severity: | Problem |
Keywords: | Cc: |
Description
The "floyd_warshall_dispatch" function sometimes tries to pass in an edge weight of infinity into the "combine" function in line 68, resulting in the wrong computational result if you use the default "combine" function. The correct behavior is to check the edge weights and if either of d[*i][*k] or d[*k][*j] is infinity, to skip the distance matrix update. Attached is the patch.
Attachments (1)
Change History (2)
by , 15 years ago
Attachment: | floyd_warshall_shortest.hpp.patch added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [48611]) Fix handling of infinite weights in Floyd-Warshall algorithm. Fixes #1700