提出求一个顶点到另一个顶点的所有最短路径的一个算法。该算法利用图中每个顶点的出度的变化,来动态修改每个顶点到目的结点的最短路径长度,用C++编制了相应程序验证该算法的正确性和高效性,该算法容易理解,降低了时间复杂度。
An algorithm for finding all the shortest paths from one vertex to another has been put forward.It uses the changes of every node s outdegree in the graph to amend dynamically the shortest path length from each node to destination.The correctness and effectiveness of the algorithm is proved by a program made in C++.The algorithm is easy to be understood,and the time complexity is lower as well.