Floyd-Warshall algorithm: Difference between revisions

Content deleted Content added
Rdm (talk | contribs)
Rdm (talk | contribs)
Line 196:
The graph matrix holds the costs of each directed node. Row index corresponds to starting node. Column index corresponds to ending node. Unconnected nodes have infinite cost.
 
This approach turns out to be faster than the more concise <./ .+~^:_ for many relatively small graphs (though <code>floyd</code> happens to be slightly slower for the task example).
 
=={{header|Java}}==