Description: 用C语言实现最短路径算法中的Floyd-Warshall算法,这个算法可以用来解决信号处理中的一些问题。floyd_warshall.c是源程序;distance_2.txt文件存放图中各点之间的距离,以99999表示无穷大;floyd.txt文件是输出文件,其中存放各轮得到的输出矩阵,以及最后得到的各点间最短距离,如果有负回路则返回FALSE。-C language shortest path algorithm of Floyd-Warshall algorithm, The algorithm can be used to solve signal processing some of the problems. Floyd_warshall.c yes source; distance_2.txt document storage map of the distance between points, 99,999 said to infinity; floyd.txt document output files, which kept the round of the output matrix, and finally come to the point of the shortest distance, If there is a negative loop it returns FALSE. Platform: |
Size: 7511 |
Author:李文 |
Hits:
Description: Floyd-Warshall算法描述
1)适用范围:
a)APSP(All Pairs Shortest Paths)
b)稠密图效果最佳
c)边权可正可负
2)算法描述:
a)初始化:dis[u,v]=w[u,v]
b)For k:=1 to n
For i:=1 to n
For j:=1 to n
If dis[i,j]>dis[i,k]+dis[k,j] Then
Dis[I,j]:=dis[I,k]+dis[k,j]
c)算法结束:dis即为所有点对的最短路径矩阵
3)算法小结:此算法简单有效,由于三重循环结构紧凑,对于稠密图,效率要高于执行|V|次Dijkstra算法。时间复杂度O(n^3)。
考虑下列变形:如(I,j)∈E则dis[I,j]初始为1,else初始为0,这样的Floyd算法最后的最短路径矩阵即成为一个判断I,j是否有通路的矩阵。更简单的,我们可以把dis设成boolean类型,则每次可以用“dis[I,j]:=dis[I,j]or(dis[I,k]and dis[k,j])”来代替算法描述中的蓝色部分,可以更直观地得到I,j的连通情况。
Platform: |
Size: 3567 |
Author:江晨 |
Hits:
Description: 用C语言实现最短路径算法中的Floyd-Warshall算法,这个算法可以用来解决信号处理中的一些问题。floyd_warshall.c是源程序;distance_2.txt文件存放图中各点之间的距离,以99999表示无穷大;floyd.txt文件是输出文件,其中存放各轮得到的输出矩阵,以及最后得到的各点间最短距离,如果有负回路则返回FALSE。-C language shortest path algorithm of Floyd-Warshall algorithm, The algorithm can be used to solve signal processing some of the problems. Floyd_warshall.c yes source; distance_2.txt document storage map of the distance between points, 99,999 said to infinity; floyd.txt document output files, which kept the round of the output matrix, and finally come to the point of the shortest distance, If there is a negative loop it returns FALSE. Platform: |
Size: 162816 |
Author:李文 |
Hits:
Description: Floyd-Warshall算法描述
1)适用范围:
a)APSP(All Pairs Shortest Paths)
b)稠密图效果最佳
c)边权可正可负
2)算法描述:
a)初始化:dis[u,v]=w[u,v]
b)For k:=1 to n
For i:=1 to n
For j:=1 to n
If dis[i,j]>dis[i,k]+dis[k,j] Then
Dis[I,j]:=dis[I,k]+dis[k,j]
c)算法结束:dis即为所有点对的最短路径矩阵
3)算法小结:此算法简单有效,由于三重循环结构紧凑,对于稠密图,效率要高于执行|V|次Dijkstra算法。时间复杂度O(n^3)。
考虑下列变形:如(I,j)∈E则dis[I,j]初始为1,else初始为0,这样的Floyd算法最后的最短路径矩阵即成为一个判断I,j是否有通路的矩阵。更简单的,我们可以把dis设成boolean类型,则每次可以用“dis[I,j]:=dis[I,j]or(dis[I,k]and dis[k,j])”来代替算法描述中的蓝色部分,可以更直观地得到I,j的连通情况。
-err Platform: |
Size: 3072 |
Author:江晨 |
Hits:
Description: 数据结构中有关FLOYD算法的VC++程序,帮助大家理解FLOYD这个数据结构-Data structure relating to FLOYD algorithm VC++ Procedures to help everyone understand the data structure FLOYD Platform: |
Size: 1862656 |
Author:杨博 |
Hits:
Description: 图的基类以及最短路径算法,dijkstra,floyd,Kruskal算法等,代码来自北大赵海燕老师编著的数据结构与算法。-Graph base class as well as the shortest path algorithm, dijkstra, floyd, Kruskal algorithm, code Zhao Haiyan teachers from Beijing University and edited by the data structure and algorithm. Platform: |
Size: 663552 |
Author:张淼 |
Hits:
Description: It is the source code of the Floyd-Warshall algorithm for finding the shortest path between all nodes.
The shortest path between two nodes of a graph is a sequence of connected nodes so that the sum of the edges that inter-connect them is minimal Platform: |
Size: 8192 |
Author:Roger |
Hits:
Description: Very good collection of c++ source code. Implementation of diffrents alghoritms in graph theory, such as floyd,fulkerson. dijkstra,warshall, binary tree,map coloring,vertex cover. Platform: |
Size: 10240 |
Author:croms |
Hits:
Description: Johson算法是目前最高效的在无负环可带负权重的网络中求所有点对最短路径的算法. Johson算法是Bellman-Ford算法, Reweighting(重赋权重)和Dijkstra算法的大综合. 对每个顶点运用Dijkstra算法的时间开销决定了Johnson算法的时间开销. 每次Dijkstra算法(d堆PFS实现)的时间开销是O( E * lgd(V) ). 其中E为边数, V为顶点数, d为采用d路堆实现优先队列ADT. 所以, 此种情况下Johnson算法的时间复杂度是O( V * E * lgd(V) ).-The Johson algorithm is currently the most efficient of the network without negative ring can with negative weights seek all points of the shortest path algorithm. Johson algorithm Bellman-Ford algorithm Reweighting (re-empower the weight) and Dijkstra algorithm for the large integrated. For eachtime overhead of the vertices using Dijkstra algorithm to determine the time of the Johnson algorithm overhead each Dijkstra algorithm (d-heap PFS), time overhead is O (E* lgd (V)) where E is the number of edges, V verticesd d Lu heap priority queue the ADT. this case the Johnson algorithm time complexity is O (V* E* lgd (V)).
Platform: |
Size: 3072 |
Author:wwll |
Hits:
Description: 利用Visual C++开发了在图论中的三个有关最短路的经典算法:Warshall、Floyd、Dijkstra,有很好的移植性,使用方便,明了。-Using Visual C++ development in graph theory in three related short-circuit the classic algorithm: of Warshall, Floyd, Dijkstra, good portability, easy to use, clear. Platform: |
Size: 4787200 |
Author:李龙 |
Hits: