Floyd-Warshall算法中的K (top most loop)告诉我们什么?我混淆了“k”表示中间顶点的数量,或者“K”表示将第k个顶点作为中间顶点。
发布于 2017-11-28 08:40:35
弗洛伊德-沃肖尔:
for(every vertex k that could possibly make distance from i to j shorter)
for(every possible vertex i)
for(every possible vertex j)
if(going through k can make the distance from i to j shorter)
you should go through k and update distance between i and j as you gohttps://stackoverflow.com/questions/47427071
复制相似问题