Opened 15 years ago

Closed 14 years ago

#1164 closed Bugs (fixed)

Floyd Warshall broken with unsigned edge weights

Reported by: Andrew Sutton Owned by: Douglas Gregor
Milestone: To Be Determined Component: graph
Version: Boost 1.34.1 Severity: Problem
Keywords: Cc:

Description

During testing for my SoC project I was running the Foyd Warshall algorithm (uninitialized) with static, unsigned edge weights (they're all 1) and distances (the value type of the matrix was unsigned). The output distance matrix is computed incorrectly. The first row and column are all 1's and the rest of the matrix is 0.

I don't know if this is really a bug, but it's certainly an undocumented feature.

Change History (1)

comment:1 by Jeremiah Willcock, 14 years ago

Resolution: fixed
Status: newclosed

(In [50808]) Changed closed_plus to match inf_plus from floyd_warshall_test, changed test to use closed_plus, fixed comments in documentation and replaced std::plus with closed_plus to match implementation, fixes #1164

Note: See TracTickets for help on using tickets.