crossdist.default(spatstat)
crossdist.default()所属R语言包:spatstat
Pairwise distances between two different sets of points
两个不同的点集的两两之间的距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the distances between each pair of points taken from two different sets of points.
计算取自两个不同的点集的每对点之间的距离。
用法----------Usage----------
## Default S3 method:
crossdist(X, Y, x2, y2, ..., period=NULL, method="C")
参数----------Arguments----------
参数:X,Y
Numeric vectors of equal length specifying the coordinates of the first set of points.
指定的第一组点的坐标的长度相等的数字向量。
参数:x2,y2
Numeric vectors of equal length specifying the coordinates of the second set of points.
指定的第二组点的坐标的长度相等的数字向量。
参数:...
Ignored.
忽略。
参数:period
Optional. Dimensions for periodic edge correction.
可选。尺寸为周期的边缘校正。
参数:method
String specifying which method of calculation to use. Values are "C" and "interpreted".
字符串,用于指定使用的计算方法。值是"C"和"interpreted"。
Details
详细信息----------Details----------
Given two sets of points, this function computes the Euclidean distance from each point in the first set to each point in the second set, and returns a matrix containing these distances.
鉴于两组点,这个函数计算从所述第一组中的每个点的第二组中的每个点的欧几里得距离,并返回一个矩阵包含这些距离。
This is a method for the generic function crossdist.
这是一个方法的通用函数crossdist。
This function expects X and Y to be numeric vectors of equal length specifying the coordinates of the first set of points. The arguments x2,y2 specify the coordinates of the second set of points.
此函数期望X和Y是指定的第一组点的坐标数值向量长度相等。的参数x2,y2指定的第二组点的坐标。
Alternatively if period is given, then the distances will be computed in the "periodic" sense (also known as "torus" distance). The points will be treated as if they are in a rectangle of width period[1] and height period[2]. Opposite edges of the rectangle are regarded as equivalent.
或者如果period给出,那么距离将被计算在定期感(也被称为环面的距离)。将被视为该点,如果他们是在一个矩形的宽度period[1]和高度period[2]。矩形的相对边缘被认为等同。
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 faster by a factor of 4.
参数method不能正常使用。它只会保留检查的软件的有效性。如果method = "interpreted"的距离计算仅使用解释R代码。如果method="C"(默认值),那么C代码使用。的C代码是由一个因子4更快。
值----------Value----------
A matrix whose [i,j] entry is the distance from the i-th point in the first set of points to the j-th point in the second set of points.
其[i,j]项是从i-th点的第一组点中的距离向j-th点的第二组点中的矩阵。
(作者)----------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----------
crossdist, crossdist.ppp, crossdist.psp, pairdist, nndist, Gest
crossdist,crossdist.ppp,crossdist.psp,pairdist,nndist,Gest
实例----------Examples----------
d <- crossdist(runif(7), runif(7), runif(12), runif(12))
d <- crossdist(runif(7), runif(7), runif(12), runif(12), period=c(1,1))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|