Floyd-Warshall (vectorized)

Versione 2.0.0 (2,3 KB) da Giorgos
[fixed version] Vectorized Floyd-Warshall algorithm to find shortest paths and distances between every node pair.
14 download
Aggiornato 17 set 2024

Visualizza la licenza

Provides both shortest paths' distances and a function to get the path itself. If you only need the distances use FloydWarshall(D) instead of FloydWarshallWithPaths(D) because its somewhat faster.
Code being vectorized means the inner loops are replaced with matlab commands which make it run faster on a lower level, though the algorithm's time complexity remains O(n^3) where n is the number of nodes.
It's good for dense graphs, while for sparse graphs it's better to use Johnson's algorithm.
See ExampleUsage.m file for how to use.

Cita come

Giorgos (2026). Floyd-Warshall (vectorized) (https://it.mathworks.com/matlabcentral/fileexchange/172800-floyd-warshall-vectorized), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2024b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Riconoscimenti

Ispirato da: Floyd-Warshall (vectorized)

Versione Pubblicato Note della release
2.0.0