nx<-20; ny<-4 #try also nx<-1000; ny<-10
r<-1.5 #try also r<-2 or r<-1.25
set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,1),runif(ny,0,1))
oldpar <- par(no.readonly = TRUE)
plotDeltri(Xp,Yp,xlab="",ylab="")
par(oldpar)
PEdomMTnd(Xp,Yp,r)
TSDomPENor(Xp,Yp,r)
TSDomPENor(Xp,Yp,r)
TSDomPENor(Xp,Yp,1.25,ch=TRUE)
#or try
ndt<-NumDelTri(Yp)
TSDomPENor(Xp,Yp,r,nt=ndt)
#values might differ due to the random of choice of the three centers M1,M2,M3
#for the non-degenerate asymptotic distribution of the domination number
TSDomPENor(Xp,Yp,r)
TSDomPENor(Xp,Yp[1:3,],r)
TSDomPENor(Xp,rbind(Yp,Yp),r)
dat.fr<-data.frame(a=Xp)
TSDomPENor(dat.fr,Yp,r)
dat.fr<-data.frame(a=Yp)
TSDomPENor(Xp,dat.fr,r)
Run the code above in your browser using DataLab