JOIN
Get Time
forums  Revision History
Search My Post History  |  My Watches  |  User Settings
Forums Tutorial Discussions Introduction to graphs and their data structures Re: dijskra: is there something missing in the article? Revision History (2 edits)
Re: dijskra: is there something missing in the article? (response to post by Petr)
got it thanks!

[edit]
actually had a wrong interpetation of how Best First Search worked, thought i works like the following,

dijkstra(S){
visited[S]=1;
for(n=0;n<N;++n) if (g[t][n]&&!visited[n]) pq.push(n);
while(!pq.empty()){
t=pq.top(); pq.pop();
dijkstra(t);
}
}

I just realised that this doesn't transverse the best first.don't know what i was thinking!

[edit1 typos]>
Re: dijskra: is there something missing in the article? (response to post by Petr)
got it thanks!

[edit]
actually had a wrong interpetation of how Best First Search worked, thought i works like the following,

dijkstra(S){
visited[S]=1;
for(n=0;n<N;++n) if (g[t][n]&&!visited[n]) pq.push(n);
while(!pq.empty()){
t=pq.top(); pq.pop();
dijkstra(t);
}
}

,but you made just realise that doesn't transverse the best first.>
Re: dijskra: is there something missing in the article? (response to post by Petr)
got it thanks!