Re: [jgrapht-users] KShortest Path implementation
Brought to you by:
barak_naveh,
perfecthash
From: Arun I. <aru...@ym...> - 2010-04-02 21:18:11
|
Hi John, Thanks for the reply. I will try to see if I can give a rigid test case. I will get back to you, when I have a good test case with me :-). Regards, Arun --- On Mon, 3/22/10, John V. Sichi <js...@gm...> wrote: From: John V. Sichi <js...@gm...> Subject: Re: [jgrapht-users] KShortest Path implementation To: "Arun Iyer" <aru...@ym...> Cc: jgr...@li... Date: Monday, March 22, 2010, 4:20 PM Arun Iyer wrote: > Hi, > I am using JGraphT's KShortestPath implementation. In the code that I have, I have to create a new graph for every run and compute KShortestPath on it. I find that KShortestPath gives the right answers almost all the time, but sometimes, it doesn't give the right answers (on the same graph on which it gave the right answer before). I was wondering, why is this non-deterministic? Is there threading involved (either in graph creation or in k-shortestpath computation) ? It does not use threading. It does use HashMaps, which can result in non-determinism in cases where ordering is arbitrary. It would help if you can provide a small isolated test case which can be run repeatedly in order to reproduce your problem reliably. Without that, it's impossible to find and fix it. JVS |