This is the talk page for discussing improvements to the Dijkstra's algorithm article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1, 2Auto-archiving period: 12 months ![]() |
![]() | This article has not yet been rated on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||||||||||||||||||||||||||
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
Please add the quality rating to the {{WikiProject banner shell}} template instead of this project banner. See WP:PIQA for details.
|
|
||
This page has archives. Sections older than 365 days may be auto-archived by Lowercase sigmabot III if there are more than 4. |
Pretty muddy
if you try to take the psudocode and directly turn it into code. Well by 5 lines an it fails. set all distance to infinity. Then you check to see if edge distance is infinity? ofc it was, you just set it to that, and now you exit. —Preceding unsigned comment added by 64.134.224.50 (talk) 00:50, 21 March 2011 (UTC)
Reply: Well actually you set the root to 0, so that will be smaller than infinity, then you set its neighbors and so on...
Greedy?
Within the description it says 'this is the "greedy" part, as described above'. 'Greed' is not mentioned before the description, probably an editing error. —Preceding unsigned comment added by 93.96.163.250 (talk) 17:31, 15 April 2010 (UTC)
What does fi ; stand for
in the code:
12 'fi' ;
What does this ''fi'' stands for? Ali Jamal--Ali Jamal 17:48, 8 December 2010 (UTC)
- It's an overly-cute but standard notation for the end of the block of code that begins with an "if". More specifically, it is "if" spelled backwards. —David Eppstein (talk) 17:54, 8 December 2010 (UTC)
- I move that it be changed to "end if," seeing as how that's what's used for "end for." -- Charles Stover 20:16, 8 December 2010 (UTC)
Wrong anim?
Look at the anim. First it goes to node #2. then when it wants to go to node #3 it count the length 9. it's absolutely wrong because if you want to go from #2 to #3 you must pass from a edge length 10. So what's the meaning of this? can anyone explain it for me? —Preceding unsigned comment added by 109.162.218.57 (talk) 12:31, 7 April 2011 (UTC)
Python code
According to WP:NOTREPOSITORY, the python code should not be here. I suggest that it be deleted soon. Please discuss it below. - Subh83 (talk | contribs) 17:29, 18 April 2011 (UTC)
- I don't agree that Python code is never justified on Wikipedia — often it can make a good alternative to pseudocode as a way of communicating the essence of an algorithm. But in this case I don't think it adds much to the pseudocode that is already here, especially since the style of writing gives up most of the advantages of conciseness and readability that Python usually has. So in this case I agree that it should be deleted. —David Eppstein (talk) 18:03, 18 April 2011 (UTC)
- Removed it.
Although I agree Python codes are quite intuitive in general, I am not sure if any specific language should be preferred since may programmers may not use that language and may be unfamiliar with the specific syntaxes. Also, preferred syntaxes may vary between versions of the programing language (Wikipedia:Algorithms_on_Wikipedia). - Subh83 (talk | contribs) 22:25, 18 April 2011 (UTC)
- Removed it.