The algorithm to use to find the (shortest) path from one node in a graph to another node is Dijkstra's algorithm, which is linear in the number of edges in the graph. Floyd Warshall is cubic in the number of vertices, and solves the connectivity problem for all pairs of nodes at once.
I presume the Graph module on CPAN has a method for applying Dijkstra's algorithm.
Abigail
In reply to Re: floyd warshall trans closure
by Abigail-II
in thread floyd warshall trans closure
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |