guille lists wrote:
> I want to find all possible paths between two vertex in a
> SimpleDirectedGraph (no loops and no multiple edges). I was going to
> do it using the DepthFirstIterator, but I'm just wondering if there is
> already a way to do it with JGraphT. I've seen the KShortestPath
> algorithm, but I'm not sure if it is appropriate for what I want since
> I just need all path (so I thought it may be easier to get them from a
> DFS). Anyway, I'll appreciate some suggestion since I'm new JGraphT
> and i'm not yet very familiar with its API.
This question comes up a lot...for an arbitary graph, the number of
paths between two vertices can be huge (consider a complete graph, for
instance), so we don't provide a method for it. I'll bet there's some
value of K above which you wouldn't want to get any more :)
JVS
|