it trades a bit of (worst-case) computational complexity - O(n^3 log(n)) vs
floyd-warshall's O(n^3) - for conciseness. despite the additional log(n) factor, in practice it's likely to be faster than floyd-warshall because it makes use of optimized matrix multiplication and bit booleans.