incremental.components(RBGL)
incremental.components()所属R语言包:RBGL
Compute connected components for an undirected graph
计算为一个无向图的连接组件
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute connected components for an undirected graph
计算为一个无向图的连接组件
用法----------Usage----------
init.incremental.components(g)
incremental.components(g)
same.component(g, node1, node2)
参数----------Arguments----------
参数:g
an instance of the graph class
graph类的一个实例
参数:node1
one vertex of the given graph
一个顶点的图
参数:node2
another vertex of the given graph
另一个给定图的顶点
Details
详情----------Details----------
This family of functions work together to calculate the connected components of an undirected graph. The algorithm is based on the disjoint-sets. It works where the graph is growing by adding new edges. Call "init.incremental.components" to initialize the calculation on a new graph. Call "incremental.components" to re-calculate connected components after growing the graph. Call "same.component" to learn if two given vertices are in the same connected components. Currently, the codes can only handle ONE incremental graph at a time. When you start working on another graph by calling "init.incremental.components", the disjoint-sets info on the previous graph is lost. See documentation on Incremental Connected Components in Boost Graph Library for more details.
这种功能的家庭一起计算一个无向图的连接组件。该算法的基础上不相交集。它的工作原理图,通过添加新的优势。称之为“init.incremental.components”,初始化一个新的图形计算。称之为“incremental.components”重新计算后,越来越多的图形的连接组件。调用“same.component学习,如果给定的两个顶点是在同一个连接的组件。目前,该代码只能处理一次增量图。当您启动另一图呼吁“init.incremental.components”,前图上的不相交集的信息都将丢失。 Boost Graph库中看到更多细节增量连接组件的文档。
值----------Value----------
Output from init.incremental.components is a list of component numbers for each vertex in the graph.
从init.incremental.components输出是图中的每个顶点列表的组件数。
Output from incremental.components is a list of component numbers for each vertex in the graph.
从incremental.components输出是图中的每个顶点列表的组件数。
Output from same.component is true if both nodes are in the same connected component, otherwise it's false.
从same.component输出是真实的,如果两个节点连接在同一个组件,否则是假的。
作者(S)----------Author(s)----------
Li Long <li.long@isb-sib.ch>
参考文献----------References----------
by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine; (Addison-Wesley, Pearson Education Inc., 2002), xxiv+321pp. ISBN 0-201-72914-8
参见----------See Also----------
connComp, connectedComp, strongComp
connComp,connectedComp,strongComp
举例----------Examples----------
con <- file(system.file("XML/conn2.gxl",package="RBGL"), open="r")
coex <- fromGXL(con)
close(con)
init.incremental.components(coex)
incremental.components(coex)
v1 <- 1
v2 <- 5
same.component(coex, v1, v2)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|