找回密码
 注册
查看: 491|回复: 0

R语言 sna包 geodist()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 10:52:25 | 显示全部楼层 |阅读模式
geodist(sna)
geodist()所属R语言包:sna

                                         Fund the Numbers and Lengths of Geodesics Among Nodes in a Graph
                                         基金中的节点图的测地线的数量和长度

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

geodist uses a BFS to find the number and lengths of geodesics between all nodes of dat.  Where geodesics do not exist, the value in inf.replace is substituted for the distance in question.
geodist使用一个BFS找到的测地线之间的所有节点dat的数量及长度。测地线不存在,则在inf.replace取代的距离。


用法----------Usage----------


geodist(dat, inf.replace=Inf, count.paths=TRUE, predecessors=FALSE,
    ignore.eval=TRUE)



参数----------Arguments----------

参数:dat
one or more input graphs.
一个或多个输入图表。


参数:inf.replace
the value to use for geodesic distances between disconnected nodes; by default, this is equal Inf.
要使用的值的测地线断开连接的节点之间的距离;默认情况下,这等于Inf。


参数:count.paths
logical; should a count of geodesics be included in the returned object?
逻辑;数测地线应包含在返回的对象?


参数:predecessors
logical; should a predecessor list be included in the returned object?
逻辑的前身列表,包含在返回的对象?


参数:ignore.eval
logical; should edge values be ignored when computing geodesics?
逻辑,边缘值计算测地线时被忽略吗?


Details

详细信息----------Details----------

This routine is used by a variety of other functions; many of these will allow the user to provide manually precomputed geodist output so as to prevent expensive recomputation.  Note that the choice of infinite path length for disconnected vertex pairs is non-canonical (albeit common), and some may prefer to simply treat these as missing values.  geodist (without loss of generality) treats all paths as directed, a fact which should be kept in mind when interpreting geodist output.
此例程所使用的各种其他功能,许多这些将允许用户手动提供预先计算geodist输出,以便防止昂贵的重新计算。需要注意的是无限的路径长度为断开的顶点对的选择是不规范的(虽然是常见的),有些人可能更喜欢简单地把这些缺失值的。 geodist不失一般性,把所有的路径,解释geodist输出时,应牢记一个事实。

By default, geodist ignores edge values.  Setting ignore.eval=FALSE will change this behavior, with edge values being interpreted as distances; where edge values reflect proximity or tie strength, transformation may be necessary.  Edge values should also be non-negative.  Because the valued-case algorithm is significantly slower than the unvalued-case algorithm, ignore.eval should be set to TRUE wherever possible.
默认情况下,geodist忽略边缘值。设置ignore.eval=FALSE会改变这种行为,与边缘的距离值被解释为边缘值反映接近或领带强度,转型可能是必要的。边缘值也应为非负数。由于价值的情况下,算法是明显慢于不受重视的情况下算法,ignore.eval的应设置为TRUE尽可能。


值----------Value----------

A list containing:
一个列表,其中包含:

<table summary="R valueblock"> <tr valign="top"><td>counts</td> <td> If count.paths==TRUE, a matrix containing the number of geodesics between each pair of vertices</td></tr> <tr valign="top"><td>gdist</td> <td> A matrix containing the geodesic distances between each pair of vertices</td></tr> <tr valign="top"><td>predecessors</td> <td> If predecessors, a list whose ith element is a list of vectors, the jth of which contains the intervening vertices on all shortest paths from i to j</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD> counts</ TD> <TD>如果count.paths==TRUE,矩阵的每对之间的测地线顶点</ TD> </ TR> <tr valign="top"> <TD> gdist </ TD> <TD>的矩阵中每对顶点之间的测量距离</ TD> </ TR > <tr valign="top"> <TD> predecessors </ TD> <TD>如果predecessors,一个列表,其第i个元素是一个向量列表,其中包含的第j个中间的顶点所有从i到j的最短路径</ TD> </ TR> </ TABLE>


注意----------Note----------

geodist implicitly treats graphs as unvalued; as such, reported distances may not be correct if all edge weights are non-identical.
geodist含蓄地将图表作为不受重视的,正因为如此,报道的距离可能是不正确的,如果所有边的权重是不相同的。


(作者)----------Author(s)----------


Carter T. Butts <a href="mailto:buttsc@uci.edu">buttsc@uci.edu</a>



参考文献----------References----------

Brandes, U.  (2000).  &ldquo;Faster Evaluation of Shortest-Path Based Centrality Indices.&rdquo; Konstanzer Schriften in Mathematik und Informatik, 120.


参见----------See Also----------

component.dist, components
component.dist,components


实例----------Examples----------


#Find geodesics on a random graph[查找随机图的测地线]
gd<-geodist(rgraph(15))

#Examine the number of geodesics[检查的数量的测地线]
gd$counts

#Examine the geodesic distances[检查测量距离]
gd$gdist

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-4 21:11 , Processed in 0.023513 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表