文件名称:merge
-
所属分类:
- 标签属性:
- 上传时间:2014-05-17
-
文件大小:787byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
/*
*并查集:
*算法介绍:并查集是一种高效的支持合并查询的数据结构
* bcj[]保存前驱节点,是并查集的结构关系数组。
* rank[]保存集合元素个数,合并时按照元素个数多少合并。
*
*函数功能:Init()是初始化bcj[],rank[],初始时,把每个元素都当成一个集合
* Find(x)是查询元素x所在的集合.
* Merge(x, y)是合并x所在集合和y所在集合.
*/-/** And check the set:* algorithm introduced: a search set is an efficient data structure to support the combined query* bcj [] save precursor node is an array of structures and investigate the relationship between sets.* Rank [] to save the number of elements in the collection, consolidation in accordance with the number of elements in the number of merger.* Function: Init () to initialize bcj [], rank [], initially, each element is set as a* Find (x) where x is the set of query elements* Merge (x, y) is. where x and y merge collections where the collection.* /
*并查集:
*算法介绍:并查集是一种高效的支持合并查询的数据结构
* bcj[]保存前驱节点,是并查集的结构关系数组。
* rank[]保存集合元素个数,合并时按照元素个数多少合并。
*
*函数功能:Init()是初始化bcj[],rank[],初始时,把每个元素都当成一个集合
* Find(x)是查询元素x所在的集合.
* Merge(x, y)是合并x所在集合和y所在集合.
*/-/** And check the set:* algorithm introduced: a search set is an efficient data structure to support the combined query* bcj [] save precursor node is an array of structures and investigate the relationship between sets.* Rank [] to save the number of elements in the collection, consolidation in accordance with the number of elements in the number of merger.* Function: Init () to initialize bcj [], rank [], initially, each element is set as a* Find (x) where x is the set of query elements* Merge (x, y) is. where x and y merge collections where the collection.* /
(系统自动生成,下载前可以参看下载内容)
下载文件列表
merge.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.