Learn R Programming

pcds (version 0.1.4)

NumArcsASMT: Number of arcs of Arc Slice Proximity Catch Digraphs (AS-PCDs) - multiple triangle case

Description

Returns the number of arcs of Arc Slice Proximity Catch Digraph (AS-PCD) whose vertices are the data points in Xp in the multiple triangle case.

AS proximity regions are defined with respect to the Delaunay triangles based on Yp points and vertex regions in each triangle are based on the center M="CC" for circumcenter of each Delaunay triangle or \(M=(\alpha,\beta,\gamma)\) in barycentric coordinates in the interior of each Delaunay triangle; default is M="CC" i.e., circumcenter of each triangle.

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points).

See (ceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds) for more on AS-PCDs. Also see (okabe:2000,ceyhan:comp-geo-2010,sinclair:2016;textualpcds) for more on Delaunay triangulation and the corresponding algorithm.

Usage

NumArcsASMT(Xp, Yp, M = "CC")

Value

A list with the elements

num.pts.in.CH

Number of Xp points in the convex hull of Yp points

num.arcs

Number of arcs in the AS-PCD for the Xp points inside the convex hull of Yp points

weight.vec

The vector of areas of the Delaunay triangles that have at least on Xp points in them

Arguments

Xp

A set of 2D points which constitute the vertices of the AS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

M

The center of the triangle. "CC" stands for circumcenter of each Delaunay triangle tri or 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle; default is M="CC" i.e., the circumcenter of each triangle.

Author

Elvan Ceyhan

References

See Also

NumArcsAStri, NumArcsPEMT, and NumArcsCSMT

Examples

Run this code
nx<-20; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny),runif(ny))

oldpar <- par(no.readonly = TRUE)
plotDeltri(Xp,Yp,xlab="",ylab="")
par(oldpar)

M<-"CC"  #try also M<-c(1,1,1)

NumArcsASMT(Xp,Yp,M)
NumArcsASMT(Xp,Yp[1:3,],M)

NumArcsASMT(c(.4,.2),Yp,M)

NumArcsASMT(Xp,rbind(Yp,Yp),M)

dat.fr<-data.frame(a=Xp)
NumArcsASMT(dat.fr,Yp,M)

Run the code above in your browser using DataLab