crossdist.psp(spatstat)
crossdist.psp()所属R语言包:spatstat
Pairwise distances between two different line segment patterns
两个不同的线段图案的两两之间的距离
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the distances between all pairs of line segments taken from two different line segment patterns.
从两个不同的线段模式采取的线段对之间的所有计算的距离。
用法----------Usage----------
## S3 method for class 'psp'
crossdist(X, Y, ..., method="Fortran", type="Hausdorff")
参数----------Arguments----------
参数:X,Y
Line segment patterns (objects of class "psp").
线段模式(对象类"psp")。
参数:...
Ignored.
忽略。
参数:method
String specifying which method of calculation to use. Values are "Fortran" and "interpreted".
字符串,用于指定使用的计算方法。值是"Fortran"和"interpreted"。
参数:type
Type of distance to be computed. Options are "Hausdorff" and "separation". Partial matching is used.
类型的距离被计算出来。选项是"Hausdorff"和"separation"。部分匹配使用。
Details
详细信息----------Details----------
This is a method for the generic function crossdist.
这是一个方法的通用函数crossdist。
Given two line segment patterns, this function computes the distance from each line segment in the first pattern to each line segment in the second pattern, and returns a matrix containing these distances.
鉴于两个线段图案,此函数计算中的第一图案的第二图案中的每个线段的每个线段的距离,并返回一个矩阵包含这些距离。
The distances between line segments are measured in one of two ways:
线段之间的距离的量在以下两种方法之一:
if type="Hausdorff", distances are computed in the Hausdorff metric. The Hausdorff distance between two line segments is the maximum distance from any point on one of the segments to the nearest point on the other segment.
如果type="Hausdorff",距离计算的Hausdorff度量。两条线段之间的Hausdorff距离是从其中一个段上的任何一点上的最近点的其他段的最大距离。
if type="separation", distances are computed as the minimum distance from a point on one line segment to a point on the other line segment. For example, line segments which cross over each other have separation zero.
如果type="separation",距离被计算为一个线段上的一个点到另一条线段上的一个点的最小距离。例如,相互交叉的线段分离为零。
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="Fortran" (the default) then Fortran code is used. The Fortran code is several times faster.
参数method不能正常使用。它只会保留检查的软件的有效性。如果method = "interpreted"的距离计算仅使用解释R代码。如果method="Fortran"(默认值),然后使用Fortran代码。 Fortran代码是快好几倍。
值----------Value----------
A matrix whose [i,j] entry is the distance from the i-th line segment in X to the j-th line segment in Y.
一个矩阵,它的[i,j]从i线段X个j线段Y个条目的距离。
(作者)----------Author(s)----------
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>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参见----------See Also----------
pairdist, nndist, Gest
pairdist,nndist,Gest
实例----------Examples----------
L1 <- psp(runif(5), runif(5), runif(5), runif(5), owin())
L2 <- psp(runif(10), runif(10), runif(10), runif(10), owin())
D <- crossdist(L1, L2)
#result is a 5 x 10 matrix[结果是5×10的矩阵]
S <- crossdist(L1, L2, type="sep")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|