I tired the first idea and removed the A->B edges and it took a second to
work. I love it for its simplicity and elegance!

Thanks so much,

-Ahmed


On Mon, Nov 25, 2013 at 4:58 AM, Tamás Nepusz <[email protected]> wrote:

>  I had to terminate because my graph might have cycles. I don't need all
> possible path. I just need a path that's longer the immediate path between
> two nodes if it exists.
>
> For instance:
>
> If A->B and
> also A->C->B or A->D->B
>
> I need to see those two paths.
>
> The easiest is probably to temporarily remove the A-B edge from your graph
> and try the shortest path search again.
>
> An alternative is to use a k-shortest-paths algorithm with some low k.
> Someone else has already ported Yen’s k-shortest-path algorithm to igraph
> using its Python interface so you might try this:
>
> https://gist.github.com/ALenfant/5491853
>
> Note that this will modify the edge IDs because it adds and removes edges
> temporarily. Make sure to copy your graph first before calling yen_igraph()
> on it.
>
> —
> T.
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to