Last chance! 50% off unlimited learning
Sale ends in
Returns the arc density of AS-PCD whose vertex set is the given 2D numerical data set, Xp
,
(some of its members are) in the triangle tri
.
AS proximity regions is defined with respect to tri
and vertex regions are defined with the center M
="CC" for circumcenter of tri
;
or tri
; default is M
="CC" i.e. circumcenter of tri
.
For the number of arcs, loops are not allowed so arcs are only possible for points inside tri
for this function.
tri.cor
is a logical argument for triangle correction (default is TRUE
),
if TRUE
, only the points inside the triangle are considered (i.e., digraph induced by these vertices
are considered) in computing the arc density, otherwise all points are considered
(for the number of vertices in the denominator of arc density).
See also (ceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
ASarcdens.tri(Xp, tri, M = "CC", tri.cor = TRUE)
A set of 2D points which constitute the vertices of the AS-PCD.
Three 2D points, stacked row-wise, each row representing a vertex of the triangle.
The center of the triangle. "CC" stands for circumcenter of the triangle tri
or a 2D point in Cartesian coordinates or
a 3D point in barycentric coordinates which serves as a center in the interior of tri
;
default is M
="CC" i.e. the circumcenter of tri
.
A logical argument for computing the arc density for only the points inside the triangle, tri
(default=TRUE
), i.e., if TRUE
only the induced digraph with the vertices inside tri
are considered in the
computation of arc density.
Arc density of AS-PCD whose vertices are the 2D numerical data set, Xp
;
AS proximity regions are defined with respect to the triangle tri
and CC-vertex regions.
# NOT RUN {
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
set.seed(1)
n<-10 #try also n<-20
dat<-runif.tri(n,Tr)$g
M<-as.numeric(runif.tri(1,Tr)$g) #try also M<-c(1.6,1.2)
NumArcsAStri(dat,Tr,M)
ASarcdens.tri(dat,Tr,M)
ASarcdens.tri(dat,Tr,M,tri.cor = FALSE)
ASarcdens.tri(dat,Tr,M)
dat.fr<-data.frame(a=dat)
ASarcdens.tri(dat.fr,Tr,M)
dat.fr<-data.frame(a=Tr)
ASarcdens.tri(dat,dat.fr,M)
# }
Run the code above in your browser using DataLab