pairdist.ppp(spatstat)
pairdist.ppp()所属R语言包:spatstat
Pairwise distances
成对距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the matrix of distances between all pairs of points in a point pattern.
计算矩阵的所有点对点模式之间的距离。
用法----------Usage----------
## S3 method for class 'ppp'
pairdist(X, ..., periodic=FALSE, method="C", squared=FALSE)
参数----------Arguments----------
参数:X
A point pattern (object of class "ppp").
点模式(类的对象"ppp")。
参数:...
Ignored.
忽略。
参数:periodic
Logical. Specifies whether to apply a periodic edge correction.
逻辑。指定是否申请一个周期的边缘校正。
参数:method
String specifying which method of calculation to use. Values are "C" and "interpreted". Usually not specified.
字符串,用于指定使用的计算方法。值是"C"和"interpreted"。通常没有指定。
参数:squared
Logical. If squared=TRUE, the squared distances are returned instead (this computation is faster).
逻辑。如果squared=TRUE,距离的平方返回,而不是(此计算速度更快)。
Details
详细信息----------Details----------
This is a method for the generic function pairdist.
这是一个方法的通用函数pairdist。
Given a point pattern X (an object of class "ppp"), this function computes the Euclidean distances between all pairs of points in X, and returns the matrix of distances.
给定一个点模式X(类的一个对象"ppp"),这个函数计算所有点对之间的欧氏距离在X,并返回的距离矩阵。
Alternatively if periodic=TRUE and the window containing X is a rectangle, then the distances will be computed in the "periodic" sense (also known as "torus" distance): opposite edges of the rectangle are regarded as equivalent. This is meaningless if the window is not a rectangle.
或者,如果periodic=TRUE和窗口,该窗口包含X是一个矩形,然后将计算的距离在定期感(也被称为“圆环”距离):矩形的相对边缘视为等同。这是无意义的,如果该窗口不在一个矩形。
If squared=TRUE then the squared Euclidean distances d^2 are returned, instead of the Euclidean distances d. The squared distances are faster to calculate, and are sufficient for many purposes (such as finding the nearest neighbour of a point).
如果squared=TRUE然后的平方欧氏距离d^2返回,而不是的欧几里德距离d。距离的平方速度来计算,足够用于多种用途(如寻找最近的邻居的一个点)。
The argument method is not normally used. It is retained only for checking the validity of the software. If method = "interpreted" then the distances are computed using interpreted R code only. If method="C" (the default) then C code is used. The C code is somewhat faster.
参数method不能正常使用。它只会保留检查的软件的有效性。如果method = "interpreted"的距离计算仅使用解释R代码。如果method="C"(默认值),那么C代码使用。 C代码是稍快。
值----------Value----------
A square matrix whose [i,j] entry is the distance between the points numbered i and j.
一方阵的[i,j]项是点之间的距离编号i和j。
(作者)----------Author(s)----------
Pavel Grabarnik
<a href="mailto:pavel.grabar@issp.serpukhov.su">pavel.grabar@issp.serpukhov.su</a>
and
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
参见----------See Also----------
pairdist, pairdist.default, pairdist.psp, crossdist, nndist, Kest
pairdist,pairdist.default,pairdist.psp,crossdist,nndist,Kest
实例----------Examples----------
data(cells)
d <- pairdist(cells)
d <- pairdist(cells, periodic=TRUE)
d <- pairdist(cells, squared=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|