Floyd-Warshall (vectorized)

Version 1.0.0.0 (159 Bytes) by Giorgos Dim
Vectorized Floyd-Warshall algorithm to find shortest paths and distances between every node pair.
524 Downloads
Updated 26 May 2018

View License

-- The input weight (or initial distance) matrix must have Inf values where the nodes aren't connected and 0's on the diagonal.
-- Outputs are the shortpaths' distance matrix D, and predecessor's matrix P such that P(i,j) is the node before j on the shortest path from i to j, so if you want to build the paths you have to read P backwards.
Hope it helps!

Cite As

Giorgos Dim (2024). Floyd-Warshall (vectorized) (https://www.mathworks.com/matlabcentral/fileexchange/67503-floyd-warshall-vectorized), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Graph and Network Algorithms in Help Center and MATLAB Answers
Acknowledgements

Inspired by: Vectorized Floyd-Warshall

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0