reverseEdgeDirections(graph)
reverseEdgeDirections()所属R语言包:graph
Reverse the edges of a directed graph
扭转一个有向图的边缘
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return a new directed graph instance with each edge oriented in the opposite direction relative to the corresponding edge in the input graph.
每个面向相反的方向相输入图中的对应边的边缘,返回一个新的有向图的实例。
用法----------Usage----------
reverseEdgeDirections(g)
参数----------Arguments----------
参数:g
A graph subclass that can be coerced to graphAM
一个graph子类可以强制graphAM
Details
详情----------Details----------
WARNING: this doesn't handle edge attributes properly. It is a preliminary implementation and subject to change.
警告:这并不妥善处理边缘属性。这是一个初步的实施,如有变更。
值----------Value----------
A graphNEL instance
一个graphNEL实例
作者(S)----------Author(s)----------
S. Falcon
举例----------Examples----------
g <- new("graphNEL", nodes=c("a", "b", "c"),
edgeL=list(a=c("b", "c"), b=character(0), c=character(0)),
edgemode="directed")
stopifnot(isAdjacent(g, "a", "b"))
stopifnot(!isAdjacent(g, "b", "a"))
grev <- reverseEdgeDirections(g)
stopifnot(!isAdjacent(grev, "a", "b"))
stopifnot(isAdjacent(grev, "b", "a"))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|