Re: Passing Functions

2011-03-11 Thread yoro
On Mar 11, 2:00 am, MRAB wrote: > On 11/03/2011 01:13, yoro wrote: > > > Hi, > > > I am having an issue with passing values from one function to another > > - I am trying to fill a list in one function using the values > > contained in other functions as see

Passing Functions

2011-03-10 Thread yoro
Hi, I am having an issue with passing values from one function to another - I am trying to fill a list in one function using the values contained in other functions as seen below: infinity = 100 invalid_node = -1 startNode = 0 #Values to assign to each node class Node: distFromSource =

Re: Dijkstra Algorithm Help

2011-03-08 Thread yoro
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

Dijkstra Algorithm Help

2011-03-08 Thread yoro
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