Kruskal最小生成树我要分享

Kruskal minimum spanning tree

matlab Kruskal 生成 最小

关注次数: 266

下载次数: 0

文件大小: 18.28 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:matlab练习程序(Kruskal最小生成树) 老物了,网上的例子多的数不过来。不过我还是有必要练习一下的。之所以看这个算法是因为最近在看颜色聚合向量时,有的论文用到了最小生成树,因此我就拿来熟悉一下。Kruskal算法类似于连通分支算法,感觉和过去实现过的连通区域标记算法非常像。


English Description:

MATLAB training program (Kruskal minimum spanning tree) of old, online examples of countless. But I still need to practise. Is this algorithm because watching color polymeric vectors, some papers using minimum spanning tree, so I brought it to familiarize yourself. Kruskal algorithm is similar to the connected component algorithm, feel connected component labeling algorithm implemented in the past very much alike. Steps: 1. for a graph, diagram each side withdraw sort from smallest to largest. 2. are sorted in order to join the new diagram, if the new figure appeared in the ring, then you give up on that side. 3. Repeat step two.


代码预览