所属分类:
中间件编程
开发工具:Visual C++
文件大小:1KB
下载次数:2
上传日期:2009-12-01 09:19:34
说明: 首先,引进一个辅助向量D,它的每个分量D表示当前所找到的从始点v到每个终点vi的最短路径的长度。如D[3]=2表示从始点v到终点3的路径相对最小长度为2。这里强调相对就是说在算法过程中D的值是在不断逼近最终结果但在过程中不一定就等于最短路径长度。它的初始状态为:若从v到vi有弧,则D为弧上的权值;否则置D为∞。显然,长度为 D[j]=
(First of all, the introduction of an auxiliary vector D, for each of its component D that found by the current from the starting point v to each end of the length of the shortest path vi. If D [3] = 2, said from the beginning point of the path of v to the end of three relative minimum length of 2. Emphasize here that in the algorithm process of the relative value of D is closer and closer to the final result, but in the process does not necessarily mean that the shortest path length. Its initial state: If there are arcs from v to vi, then the D value for the arc on the right otherwise set D is ∞. Clearly, the length of D [j] =)