randomNodeGraph(graph)
randomNodeGraph()所属R语言包:graph
Generate Random Graph with Specified Degree Distribution
生成随机指定的度分布图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
randomNodeGraph generates a random graph with the specified degree distribution. Self-loops are allowed. The resultant graph is directed (but can always be coerced to be undirected).
randomNodeGraph生成一个指定的度分布的随机图。允许自我循环。由此产生的图形指示(但总是可以强制为无向)。
用法----------Usage----------
randomNodeGraph(nodeDegree)
参数----------Arguments----------
参数:nodeDegree
A named integer vector specifying the node degrees.
命名的整数向量指定的节点度。
Details
详情----------Details----------
The input vector must be named, the names are taken to be the names of the nodes. The sum must be even (there is a theorem that says we require that to construct a graph). Self-loops are allowed, although patches to the code that make this a switchable parameter would be welcome.
必须命名为输入向量,采取的是节点的名称的名称。总和必须是偶数,(有一个定理说,我们需要构建一个图)。自我循环是允许的,虽然补丁的代码,使这个可切换参数将受到欢迎。
值----------Value----------
An instance of the graphNEL class. The graph is directed.
graphNEL类的一个实例。定向图。
作者(S)----------Author(s)----------
R. Gentleman
参考文献----------References----------
<h3>See Also</h3> <code>randomGraph</code>, <code>randomEGraph</code>
举例----------Examples----------
set.seed(123)
c1 <- c(a = 1, b = 1, c = 2, d = 4)
(g1 <- randomNodeGraph(c1))
stopifnot(validObject(g1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|