Re: [jgrapht-users] finding all paths from one vertex to another
Brought to you by:
barak_naveh,
perfecthash
From: DanielAgota <ago...@gm...> - 2010-07-26 10:57:44
|
Hi, do you need the exact paths? You could rewrite/extend the BreadhtFirstIterator for instance... take a look at the encounterVertex/encounterVertexAgain methods. I have used/extended the methods above to count the number of shortest paths between one StartVertex and all the others and get their distances from the start vertex - the length of the shortest path. You could also use the FloydWarhallShortestPaths (check spelling) class, if you know the maximal number of paths you are interested in. Or combine the two, to find the number of shortest paths and list them :) ... it definitely won't scale very good... Regards, Daniel -- View this message in context: http://jgrapht-users.107614.n3.nabble.com/finding-all-paths-from-one-vertex-to-another-tp108000p995888.html Sent from the jgrapht-users mailing list archive at Nabble.com. |