centroidal(voronoi)
centroidal()所属R语言包:voronoi
Centroidal Voronoi Diagram
质心Voronoi图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Iteratively searches for the centroidal Voronoi diagram by shifting each point to the weighted centroid of its cell, re-tessellating, shifting each point to its new weighted centroid, and repeating until convergence.
迭代搜索的质心Voronoi图,把各点,其单元的加权质心,重新镶嵌,每个点转移到新的加权质心,并重复直到收敛。
用法----------Usage----------
centroidal(x, eps = .01, max.iter = 100, f = NULL, antideriv.x = NULL,
antideriv.y = NULL, divisions = 15, rw = NULL, verbose = 0)
参数----------Arguments----------
参数:x
An M-by-2 matrix or data frame representing a point pattern, or an object of class deldir or ve.
M的2矩阵或数据框代表一个点图案,或一个对象类deldir或ve。
参数:eps
The algorithm will stop when the maximum distance moved by any point between iterations is less than eps.
该算法将停止时的最大迭代点之间的任何移动的距离小于eps。
参数:max.iter
Specifies the maximum number of iterations, provided the eps criterion is not met.
指定的最大迭代次数,提供eps不满足条件。
参数:f
A function taking two arguments over which the centroidal Voronoi diagram is constructed.
函数两个参数的重心Voronoi图的构造。
参数:antideriv.x
A function taking two arguments that is the antiderivative of f with respect to its first argument. Specification of antideriv.x is optional, but will improve efficiency if specified.
函数两个参数,这是它的第一个参数就反导的f。 antideriv.x规范是可选的,但如果指定的话,会提高工作效率。
参数:antideriv.y
A function taking two arguments that is the antiderivative of f with respect to its second argument. Specification of antideriv.y is optional, but will improve efficiency if specified.
函数两个参数,这是它的第二个参数就反导的f。 antideriv.y规范是可选的,但如果指定的话,会提高工作效率。
参数:divisions
A scalar which controls the number of subintervals over which a Riemann sum is computed. Higher values produce more precise centroid location calculations.
一个标量,它控制的子区间数的黎曼计算的。较高的值会产生更精确的计算质心位置。
参数:rw
An optional vector of length 4 describing the corners of the rectangular space of the data. The values should be in the order of (xmin, xmax, ymin, ymax).
一个可选的矢量的长度为4描述的数据的矩形空间的角部。值应该是在顺序(XMIN,XMAX,YMIN,YMAX)。
参数:verbose
If set to an integer value greater than 0, the user will be notified upon the completion of every verbose iterations.
如果设置为大于0的值的整数,用户将收到的每verbose迭代完成后。
Details
详细信息----------Details----------
The function centroidal iteratively searches for the centroidal Voronoi diagram by shifting each point to the weighted centroid of its cell, re-tessellating, and shifting each point to its new weighted centroid. If f is set to NULL, each location in the space has equal weight, and the resulting centroid calculations merely involve finding the geometric center of any given cell. If f is specified, each location v=(x, y) has weight assigned by f(v). Given such weights, calculation of the weighted centroid for cell C proceeds as
的功能centroidal迭代搜索的重心,其单元的加权质心,再棋盘,把每个点,每一个点转移到新的加权质心Voronoi图。如果f被设置成NULL,在该空间的每个位置具有相同的权重,并且所得到的质心计算只是涉及找到的几何中心的任何给定的小区。如果f指定,每个位置v=(x, y)有重量分配的f(v)。鉴于这种电池C所得款项的权重,计算的加权质心
值----------Value----------
The output object is of class ve, which itself is a list with the following items: <table summary="R valueblock"> <tr valign="top"><td>p </td> <td> A matrix of the points.</td></tr> <tr valign="top"><td>z </td> <td> A vector of the Voronoi estimates at the points.</td></tr> <tr valign="top"><td>T </td> <td> A deldir object for the points.</td></tr> <tr valign="top"><td>est </td> <td> Set to NULL. See ve.</td></tr>
输出对象是类ve,这本身就是一个列表以下项目:<table summary="R valueblock"> <tr valign="top"> <TD>p </ TD > <TD>矩阵之分。</ TD> </ TR> <tr valign="top"> <TD>z </ TD>的Voronoi <td>一个向量的点估计</ TD> </ TR> <tr valign="top"> <TD>T </ TD> <TD> Adeldir对象的点。</ TD> </ TR > <tr valign="top"> <TD> est </ TD> <TD>设置为NULL。见ve。</ TD> </ TR>
</table> Appended to the ve list are: <table summary="R valueblock"> <tr valign="top"><td>iter</td> <td> The number of iterations performed.</td></tr> <tr valign="top"><td>max.dist</td> <td> A vector containing the maximum distance moved by any point at each iteration.</td></tr> </table>
</ TABLE>附加ve列表中:<table summary="R valueblock"> <tr valign="top"> <TD> iter</ td> <td>使用数量的迭代进行。</ TD> </ TR> <tr valign="top"> <TD>max.dist </ TD> <TD>一个向量的最大距离所提出的任何一点,在每一次迭代。</ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Travis A. Gerke and Christopher D. Barr
参考文献----------References----------
Q. Du, V. Faber and M. Gunzburger. Centroidal Voronoi Tesselations: Applications and Algorithms. SIAM Review 41:637-676, 1999.
C.G. Wager, B.A. Coull and N. Lange. Modelling Spatial Intensity for Replicated Inhomogeneous Point Patterns in Brain Imaging. J.R. Statist. Soc. B, 66:429-446, 2004.
C.D Barr and F.P Schoenberg. On the Voronoi Estimator for the Intensity of an Inhomogeneous Planar Poisson Process. Biometrika, 1:1-15, 2010.
参见----------See Also----------
polygon.adapt, integrate.box
polygon.adapt,integrate.box
实例----------Examples----------
#=====> Uniform Function <=====#[=>统一功能=====#]
obj <- deldir(runif(10), runif(10))
c.obj <- centroidal(x = obj, eps = .001)
par(mfrow=c(1,2))
plot(obj, wlines="tess", main="Original Tessellation")
plot(c.obj$T, wlines="tess", main="Centroidal Tessellation")
#=====> Polynomial Function <=====#[=>多项式函数=====#]
f <- function(x, y) x^4 + y^4
antideriv.x <- function(x, y) x^5/5 + x*y^4
antideriv.y <- function(x, y) y*x^4 + y^5/5
obj <- deldir(runif(10), runif(10))
c.obj <- centroidal(x = obj, eps = .005, f = f,
antideriv.x = antideriv.x,
antideriv.y = antideriv.y,
divisions = 10, verbose = 5)
par(mfrow=c(1,2))
plot(obj, wlines="tess", main="Original Tessellation")
plot(c.obj$T, wlines="tess", main="Centroidal Tessellation")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|