[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Implementing the Dijkstra Algorithm
- From: Luis Carvalho <carvalho@...>
- Date: Tue, 22 Nov 2005 12:02:46 -0500
> > Thank you mate, I will start implementing it. The only think that
> >will have to be diferent is how to mark when there is no edge between
> >two nodes I will use -1, because 0 is a valid cost. :)
>
> nil would be a good choice
Also for the INFs; actually, a no-edge should have distance INF, and so, just
substitute INFs by nils all together. It should be faster and makes more sense
in Lua.
Cheers,
luis.
--
A mathematician is a device for turning coffee into theorems.
-- P. Erdos
--
Luis Carvalho
Applied Math PhD Student - Brown University
PGP Key: E820854A <carvalho@dam.brown.edu>