posted 12 years ago
Ok I have a 2d array reprsenting my adjacency matrix but I am not quite sure how to go about starting the implementation of dijkstra's algorithm. I'm not sure how to go about marking the vertices as true or keeping track of which ones are true and which ones aren't. Right now I am trying to use an array of booleans but I'm not sure this is the best way. I was just wondering if anybody had any opinions on how to go about this first part of Dijkstra's algorithm using a 2d array.
posted 12 years ago
There are a ton of different ways to go about doing homework. I spent about a week looking all over the 'net finding different implementations and studying what they did and most importantly, how they worked. Once I understood how it worked (It took me a few days to realize that I didn't really understand how it worked, even though I was sure I did), then it was relatively easy to program.... well, there were a couple recursive parts that were sort of tough.
How are you keeping track of your edges? How are you keeping track of what goes where? Start out with a graph of only 3 or 4 nodes, and tinker with it until you start to develop a plan, then post back here with your ideas.Someone will let you know if you are on track or not, but since this is a well known homework problem, trhe only people that know how to do it remember how hard they had to work to figure it out, and probably won't want to just give you the answers.
How are you keeping track of your edges? How are you keeping track of what goes where? Start out with a graph of only 3 or 4 nodes, and tinker with it until you start to develop a plan, then post back here with your ideas.Someone will let you know if you are on track or not, but since this is a well known homework problem, trhe only people that know how to do it remember how hard they had to work to figure it out, and probably won't want to just give you the answers.
Chris Brandt
Greenhorn
Posts: 4
posted 12 years ago
There are a ton of different ways to go about posting. Most can be divided up into two main categories though. Those that are useful and informative...and those that are not. Yours was the latter. Nowhere did I ask for an answer. Nowhere did I ask for code. I simply asked for an idea and you chose to give a sarcastic remark that was a total and utter waste of your time. Of course, I guess this constitutes a waste of my time too.
[ February 21, 2006: Message edited by: Chris Brandt ]
[ February 21, 2006: Message edited by: Chris Brandt ]
The City calls upon her steadfast protectors. Now for a tiny ad:
The WEB SERVICES and JAXRS Course
https://coderanch.com/t/690789/WEBSERVICESJAXRS
