简体   繁体   English

在大型数据集中查找连接的组件时可以使用哪些数据结构选项?

[英]what options of data structure could be used in finding connected components in large datasets?

let's say we have a HashMap with for a graph with node and adjacency list 假设我们有一个HashMap用于带有节点和邻接列表的图

HashMap[node:Long,compId:Long, neighbours:Set[Long])]

what is the best way to update all the nodes with the minimum compId(connected component id) and what is the best data structure that can be used when the size of the data is large? 用最小的compId(连接的组件ID)更新所有节点的最佳方法是什么?当数据大时可以使用的最佳数据结构是什么?

仅使用不相交的集合数据结构,通常情况下,摊销的复杂度将为O(1),非常快!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 什么数据结构可用于存储具有多个可比较属性的对象 - What data structure could be used to store objects with multiple comparable attributes 应该使用什么数据结构来存储带有重复单词的大句子(可能是数百万个单词) - What Data Structure should be used to store a large sentence (may be millions of words) with repetition of words 可以使用什么数据结构/算法来检索JavaScript中的一对值(前后) - What data structure/algorithm could be used to retrieve a pair of values (before & after) in JavaScript 在动态图中查找连接的组件 - Finding connected components in a DYNAMIC Graph 在范围列表中查找点的数据结构是什么? - What data structure for finding a point in a list of ranges? 有什么方法可以更有效地替换此数据结构? - What could be a more efficient replacement of this data structure? 应该用什么数据结构来表示这张表? - What data structure should be used to represent this table? 自动补全使用什么数据结构或算法? - What data structure or algorithm is used for autocompletion? 什么数据结构用于存储 HDFS 元数据? - What data structure is used to store HDFS Metadata? Elasticsearch扁平型使用的数据结构是什么 - What is data structure used for Elasticsearch flattened type
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM