05-30-09
Dijkstra’s algorithm AS3
Say you live in weighted graph. And say you want to go from vertex A on that graph to vertex D, for instance, following the shortest path. Well it so happens that a smart man called Edsger Dijkstra already figured that one out. He came up with an algorithm to get the shortest path weight in a graph.
If you are interested in graph and data structures and all that stuff, you should read up about it. A quick google search should do the trick, and if not this might help, and this too.
This is the kind of stuff you can do with graphs. Pretty cool!
I added the source, and my data structure classes. They’re still work in progress, but they work pretty well with Dijkstra’s algorithm. If you want some pretty cool data structs check those out.
Click on a node to select it as source node, click on another one, and watch the shortest path show up.
Video | Enjolt.com | Innovate for Success
[...] May 29th, 2009 // 19 Comments // Personal Dijkstra’s algorithm – signalsondisplay.com 05/30/2009 By Dominic | May 30, 2009 Say you live in weighted graph … [...]
05-30-09 » 5:34 am »
Shortest path algorithm
[...] check it out here: http://www.signalsondisplay.com/blog/?p=127 [...]
05-30-09 » 5:07 pm »