数学建模社区-数学中国

标题: Dijkstra最短路径算法 [打印本页]

作者: 建不了的模。    时间: 2014-10-9 10:48
标题: Dijkstra最短路径算法
Dijkstra最短路径算法
Dijkstra's Shortest Path Algorithm

calculates the shortest path and distance between two nodes on a map

This function can  
    1. Find the shortest path and distance from a starting node to an ending node on a map**  
    2. Find the shortest paths and distances from a starting node to ALL other nodes on a map**  

**The map should consist of nodes and segments, such that:  
    1. nodes have the format [ID X Y] or [ID X Y Z] (with ID being an integer, and X,Y,Z representing position coordinates and of type double)  
    2. segments have the format [ID N1 N2] (with ID being an integer, and N1 N2 representing IDs from the nodes list such that there is an [undirected] edgefile:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\V7(XMWRN]{G8~CI}BCCR3QC.gifgment between node N1 and node N2, and obviously of integer type also)  

Note:  
    The function generates a random map of nodes and segments that it uses if no inputs are given. This way, it acts like a script if it is run with no inputs, and it acts like a function otherwise.



作者: ゞ_轻描丶幸福的    时间: 2014-10-9 15:56
不错的资料
作者: 深V礼    时间: 2014-10-9 16:00
资料收集狂来了
作者: 建不了的模。    时间: 2014-10-9 16:12
深V礼 发表于 2014-10-9 16:00
资料收集狂来了

欢迎,有用你就果断的搬走吧。
作者: 苍松绿竹    时间: 2014-11-13 15:35
!!!!!!!!!!!!!!!!!!

作者: 、尐_包_孖﹏¨    时间: 2014-11-13 19:22
看一下 会有神马

作者: 神笔马龙1    时间: 2014-11-15 22:57
好啊。。。。。。。。。。。。。。。

作者: 神笔马龙1    时间: 2014-11-15 22:57
好啊。。。。。。。。。。。。。。。

作者: Moyago    时间: 2014-11-20 21:13
!!!!!!!!!!!!!!!!!!!!!!!

作者: Moyago    时间: 2014-11-20 21:13
!!!!!!!!!!!!!!!!!!!!!!!

作者: Moyago    时间: 2014-11-20 21:14
!!!!!!!!!!!!!!!!!!!!!!!

作者: Moyago    时间: 2014-11-20 21:14
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

作者: Moyago    时间: 2014-11-20 21:15
!!!!!!!!!!!!!!!!!!!!!1

作者: 霏V彽↘调★V    时间: 2015-1-14 15:14
想看一下,有用没

作者: 北方阳光    时间: 2015-2-7 21:25
不错~想看看~收集好资料

作者: Mr.Vt    时间: 2015-2-7 23:50
快捷键狂欢节和刻录机

作者: 阳光的起点    时间: 2015-5-1 09:59
谢谢楼主

作者: 娜写年华    时间: 2015-5-1 14:15
不错不错不错不错不错不错不错

作者: 娜写年华    时间: 2015-5-1 14:15
不错不错不错不错不错不错不错

作者: 娜写年华    时间: 2015-5-1 14:16
很不错的一个算法,刚好解决了我的问题





欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5