connect

所属分类:超算/并行计算
开发工具:C/C++
文件大小:2KB
下载次数:11
上传日期:2008-06-11 21:18:34
上 传 者shmily7901
说明:  顶点倒塌(Vertex Collapse)算法中,一开始图中的N个顶点看作N个孤立的超顶点(Super Vertex),算法运行中,有边连通的超顶点相继合并,直到形成最后的整个连通分量。每个顶点属于且仅属于一个超顶点,超顶点中标号最小者称为该超顶点的根。
(Collapsed vertex (Vertex Collapse) algorithm, one began to map the N vertices as N isolated vertices super (Super Vertex), algorithm, there are the super-edge-connected vertices have merged to form the final until the entire connected component . Each vertex belongs to and only belong to one super-vertex, super-vertex in the smallest numbers are referred to as the root of the super-vertex.)

文件列表:
15-2\connect.c (4729, 2003-07-15)
15-2 (0, 2008-05-21)

Example: 编译:mpicc connect.c 运行:本实例中使用3个处理器。    mpirun Cnp 3 a.out 运行结果: Input the vertex num: 8 Input the adjacent matrix: 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 0 最终输出结果: Result: 0 0 2 0 0 0 0 0 说明:使用了和上一小节传递闭包时相同的输入矩阵,得到的结果也相同。除顶点2外,其余顶点构成另一个连通分

近期下载者

相关文件


收藏者