http://www.perlmonks.org?node_id=868045


in reply to Finding All Paths From a Graph From a Given Source and End Node

Did you already look at the Graph module? It has a chapter in the man page that awfully sounds like your quest:

All-Pairs Shortest Paths (APSP) For either a directed or an undirected graph, return the APSP o +bject describing all the possible paths between any two vertices of t +he graph. If no weight is defined for an edge, 1 (one) is assumed +.

Enjoy, Have FUN! H.Merijn
  • Comment on Re: Finding All Paths From a Graph From a Given Source and End Node
  • Download Code