JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat  | Threaded  | Tree
Previous Thread  |  Next Thread
dijskra: is there something missing in the article? | Reply
Here is how I interpret the dijktra algorithm in the article (see below):

Add the start node neighbors, then pick a high priority node from those, add its neighbours to the same heap,result: you have mixed the contents of the previous node with current one so that if the heap is remade it is possible the high priority node(top) wont be the one below the current node.
Can someone clarify this, that my line of thinking. The code from the article is given below.


void dijkstra(node start) {
priorityQueue s;
s.add(start);
while (s.empty() == false) {
top = s.top();
s.pop();
mark top as visited;

check for termination condition (have we reached the target node?)
add all of top's unvisited neighbors to the stack.

}
}
Subject Author Date
dijskra: is there something missing in the article? mafoko Mar 3, 2006 at 12:42 AM EST
Re: dijskra: is there something missing in the article? Petr Mar 3, 2006 at 4:02 AM EST
Re: dijskra: is there something missing in the article? mafoko Mar 3, 2006 at 8:07 AM EST
Re: dijskra: is there something missing in the article? mafoko Mar 3, 2006 at 8:48 AM EST
Re: dijskra: is there something missing in the article? tolkienfan Mar 3, 2006 at 4:34 PM EST
Re: dijskra: is there something missing in the article? Kawigi Mar 3, 2006 at 4:39 PM EST
Re: dijskra: is there something missing in the article? eleusive Mar 3, 2006 at 5:06 PM EST
Re: dijskra: is there something missing in the article? Petr Mar 4, 2006 at 1:51 AM EST
Re: dijskra: is there something missing in the article? TekGoNos Mar 4, 2006 at 11:26 PM EST
Re: dijskra: is there something missing in the article? rserranop Nov 13, 2006 at 9:41 PM EST
RSS