Idom.num1CSt1std.tri | R Documentation |
t=1
Returns I(
p
is a dominating point of the CS-PCD)
where the vertices of the CS-PCD are the 2D data set Xp
in the standard equilateral
triangle T_e=T(A,B,C)=T((0,0),(1,0),(1/2,\sqrt{3}/2))
, that is, returns 1 if p
is a dominating point of CS-PCD,
returns 0 otherwise.
Point, p
, is in the edge region of edge re (default is NULL
); vertices are labeled as 1,2,3
in the order they are stacked row-wise in T_e
, and the opposite edges are labeled with label of the vertices
(that is, edge numbering is 1,2
, and 3
for edges AB
, BC
, and AC
).
CS proximity region is constructed with respect to T_e
with expansion parameter t=1
and edge regions are based on center of mass CM=(1/2,\sqrt{3}/6)
.
ch.data.pnt
is for checking whether point p
is a data point in Xp
or not (default is FALSE
), so by default this
function checks whether the point p
would be a dominating point if it actually were in the data set.
See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
Idom.num1CSt1std.tri(p, Xp, re = NULL, ch.data.pnt = FALSE)
p |
A 2D point that is to be tested for being a dominating point or not of the CS-PCD. |
Xp |
A set of 2D points which constitutes the vertices of the CS-PCD. |
re |
The index of the edge region in |
ch.data.pnt |
A logical argument for checking whether point |
I(
p
is a dominating point of the CS-PCD)
where the vertices of the CS-PCD are the 2D data set Xp
,
that is, returns 1 if p
is a dominating point, returns 0 otherwise.
Elvan Ceyhan
Idom.num1CSstd.tri
## Not run:
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
CM<-(A+B+C)/3
Te<-rbind(A,B,C);
n<-10
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num1CSt1std.tri(Xp[3,],Xp)
Idom.num1CSt1std.tri(c(1,2),c(1,2))
Idom.num1CSt1std.tri(c(1,2),c(1,2),ch.data.pnt = TRUE)
gam.vec<-vector()
for (i in 1:n)
{gam.vec<-c(gam.vec,Idom.num1CSt1std.tri(Xp[i,],Xp))}
ind.gam1<-which(gam.vec==1)
ind.gam1
Xlim<-range(Te[,1],Xp[,1])
Ylim<-range(Te[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(Te,pch=".",xlab="",ylab="",xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Te)
points(Xp)
L<-Te; R<-matrix(rep(CM,3),ncol=2,byrow=TRUE);
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(rbind(Xp[ind.gam1,]),pch=4,col=2)
#rbind is to insert the points correctly if there is only one dominating point
txt<-rbind(Te,CM)
xc<-txt[,1]+c(-.02,.02,.01,.05)
yc<-txt[,2]+c(.02,.02,.03,.02)
txt.str<-c("A","B","C","CM")
text(xc,yc,txt.str)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.