transitive.closure(nem)
transitive.closure()所属R语言包:nem
Computes the transitive closure of a directed graph
计算有向图的传递闭包
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the transitive closure of a graph. Introduces a direct edge whenever there is a path between two nodes in a digraph.
计算图的传递闭包。介绍了一种直接的边缘,只要有一个有向图中两个节点之间的路径。
用法----------Usage----------
transitive.closure(g, mat=FALSE, loops=TRUE)
参数----------Arguments----------
参数:g
graphNEL object or adjacency matrix.
graphNEL对象或邻接矩阵。
参数:mat
convert result to adjacency matrix.
转换导致的邻接矩阵。
参数:loops
Add loops from each node to itself?
添加从每个节点自身的循环?
Details
详情----------Details----------
This function calculates the transitive closure of a given graph. We use the matrix exponential to find the transitive closure.
此函数计算一个给定图的传递闭包。我们使用矩阵指数传递闭包。
值----------Value----------
returns a graphNEL object or adjacency matrix
返回graphNEL对象或邻接矩阵
作者(S)----------Author(s)----------
Florian Markowetz <URL: http://genomics.princeton.edu/~florian>
参见----------See Also----------
transitive.reduction
transitive.reduction
举例----------Examples----------
V <- LETTERS[1:3]
edL <- list(A=list(edges="B"),B=list(edges="C"),C=list(edges=NULL))
g <- new("graphNEL",nodes=V,edgeL=edL,edgemode="directed")
gc <- transitive.closure(g,loops=FALSE)
par(mfrow=c(1,2))
plot(g,main="NOT transitively closed")
plot(gc,main="transitively closed")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|