Vectorized Floyd-Warshall

Vectorized (fast) implementation of the Floyd-Warshall all pairs shortest path algorithm.
3,5K download
Aggiornato 7 nov 2009

Visualizza la licenza

The Floyd-Warshall algorithm computes the all pairs shortest path matrix for a given adjacency matrix. The algorithm is O(n^3), and in most implementations you will see 3 nested for loops. This is very inefficient in Matlab, so in this version the two inner loops are vectorized (and as a result, it runs much faster).

Make sure that your input matrix is initialized properly -- A(i,j) = Inf if i and j are not neighbors.

Cita come

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

Compatibilità della release di MATLAB
Creato con R2009b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Graph and Network Algorithms in Help Center e MATLAB Answers
Versione Pubblicato Note della release
1.0.0.0