yoro wrote:
> Thanks for replying, maybe i'm misunderstanding your comment -
> nodeTable is used to store the distances from source of each node
> within a text file, the file having the format :
>
> 1,2,3,4,5,6,7,8,9
> 1,2,3,4,5,6,7,8,9
>
> Each of these nodes will have the same settings as set
yoro wrote:
>
>Thanks for replying, maybe i'm misunderstanding your comment -
Yes, it was not clear at first glance that you are calling
populateNodeTable twice. You call it once and throw away the result, then
you call it again and pass the result to tentativeDistance. That's
probably not what
On Mar 8, 6:49 pm, MRAB wrote:
> On 08/03/2011 18:12, yoro wrote:
>
>
>
> > Hello,
>
> > I am having a little trouble writing Dijkstra's Algorithm, at the
> > point where I have to calculate the distance of each node from the
> > source - here is my code so far:
>
> > infinity = 100
> > invali
On 08/03/2011 18:12, yoro wrote:
Hello,
I am having a little trouble writing Dijkstra's Algorithm, at the
point where I have to calculate the distance of each node from the
source - here is my code so far:
infinity = 100
invalid_node = -1
startNode = 0
class Node:
distFromSource = in
Hello,
I am having a little trouble writing Dijkstra's Algorithm, at the
point where I have to calculate the distance of each node from the
source - here is my code so far:
infinity = 100
invalid_node = -1
startNode = 0
class Node:
distFromSource = infinity
previous = invalid_node