ๆญฃๅœจๅŠ ่ฝฝๅ›พ็‰‡...
Dijkstra's algorithm Initialize:dist(x)=oo for allxs,and dist(s)=0. Let Q contain all of V //Q=V-R Q=V-R โ– while 0โ‰ 0 R find a u with min dist(u) uEQ S delete u from Q for each yโˆˆN(u) /update N(u) if dist(y)>dist(u)+l(u,y) dist(y)dist(u)+l(u,y) /update the estimated upper bound 29Dijkstraโ€™s algorithm โ—ผ Initialize: ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ฅ) = โˆž for all ๐‘ฅ โ‰  ๐‘ , and ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ ) = 0. โ—ผ Let ๐‘„ contain all of ๐‘‰ // ๐‘„ = ๐‘‰ โˆ’ ๐‘… โ—ผ while ๐‘„ โ‰  โˆ… find a ๐‘ข with min ๐‘ขโˆˆ๐‘„ ๐‘‘๐‘–๐‘ ๐‘ก ๐‘ข delete ๐‘ข from ๐‘„ for each ๐‘ฆ โˆˆ ๐‘(๐‘ข) // update ๐‘(๐‘ข) if ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ฆ) > ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ข) + ๐‘™(๐‘ข, ๐‘ฆ) ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ฆ) = ๐‘‘๐‘–๐‘ ๐‘ก(๐‘ข) + ๐‘™(๐‘ข, ๐‘ฆ) // update the estimated upper bound ๐‘  ๐‘ข ๐‘น ๐‘ธ = ๐‘ฝ โˆ’ ๐‘น 29
<<ๅ‘ไธŠ็ฟป้กตๅ‘ไธ‹็ฟป้กต>>
©2008-็Žฐๅœจ cucdc.com ้ซ˜็ญ‰ๆ•™่‚ฒ่ต„่ฎฏ็ฝ‘ ็‰ˆๆƒๆ‰€ๆœ‰