cl2edges.std.tri {pcds} | R Documentation |
The closest points in a data set to edges in the standard equilateral triangle
Description
An object of class "Extrema"
.
Returns the closest points from the 2D data set, Xp
,
to the edges in the
standard equilateral triangle
T_e=T(A=(0,0),B=(1,0),C=(1/2,\sqrt{3}/2))
.
ch.all.intri
is for checking
whether all data points are inside T_e
(default is FALSE
).
If some of the data points are not inside T_e
and ch.all.intri=TRUE
, then the function yields
an error message.
If some of the data points are not inside T_e
and ch.all.intri=FALSE
, then the function yields
the closest points to edges
among the data points inside T_e
(yields NA
if there are no data points
inside T_e
).
See also (Ceyhan (2005); Ceyhan et al. (2006); Ceyhan and Priebe (2007)).
Usage
cl2edges.std.tri(Xp, ch.all.intri = FALSE)
Arguments
Xp |
A set of 2D points representing the set of data points. |
ch.all.intri |
A logical argument (default= |
Value
A list
with the elements
txt1 |
Edge labels as |
txt2 |
A short description of the distances
as |
type |
Type of the extrema points |
desc |
A short description of the extrema points |
mtitle |
The |
ext |
The extrema points, i.e., closest points to edges |
X |
The input data, |
num.points |
The number of data points, i.e., size of |
supp |
Support of the data points, i.e.,
the standard equilateral triangle |
cent |
The center point used for construction of edge regions,
not required for this extrema,
hence it is |
ncent |
Name of the center, |
regions |
Edge regions inside the triangle, |
region.names |
Names of the edge regions,
not required for this extrema,
hence it is |
region.centers |
Centers of mass of the edge regions inside |
dist2ref |
Distances from closest points in each edge region to the corresponding edge |
Author(s)
Elvan Ceyhan
References
Ceyhan E (2005).
An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications.
Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.
Ceyhan E, Priebe CE (2007).
“On the Distribution of the Domination Number of a New Family of Parametrized Random Digraphs.”
Model Assisted Statistics and Applications, 1(4), 231-255.
Ceyhan E, Priebe CE, Wierman JC (2006).
“Relative density of the random r
-factor proximity catch digraphs for testing spatial patterns of segregation and association.”
Computational Statistics & Data Analysis, 50(8), 1925-1964.
See Also
cl2edges.vert.reg.basic.tri
, cl2edgesMvert.reg
,
cl2edgesCMvert.reg
and fr2edgesCMedge.reg.std.tri
Examples
n<-20 #try also n<-100
Xp<-runif.std.tri(n)$gen.points
Ext<-cl2edges.std.tri(Xp)
Ext
summary(Ext)
plot(Ext,asp=1)
ed.clo<-Ext
A<-c(0,0); B<-c(1,0); C<-c(0.5,sqrt(3)/2);
Te<-rbind(A,B,C)
CM<-(A+B+C)/3
p1<-(A+B)/2
p2<-(B+C)/2
p3<-(A+C)/2
Xlim<-range(Te[,1],Xp[,1])
Ylim<-range(Te[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]
plot(A,pch=".",xlab="",ylab="",axes=TRUE,xlim=Xlim+xd*c(-.05,.05),
ylim=Ylim+yd*c(-.05,.05))
polygon(Te)
points(Xp,xlab="",ylab="")
points(ed.clo$ext,pty=2,pch=4,col="red")
txt<-rbind(Te,p1,p2,p3)
xc<-txt[,1]+c(-.03,.03,.03,0,0,0)
yc<-txt[,2]+c(.02,.02,.02,0,0,0)
txt.str<-c("A","B","C","re=1","re=2","re=3")
text(xc,yc,txt.str)