Idom.num2AStri {pcds} | R Documentation |
The indicator for two points constituting a dominating set for Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case
Description
Returns I(
{p1,p2
} is a dominating set of the AS-PCD)
where vertices of the AS-PCD are
the 2D data set Xp
), that is, returns 1 if {p1,p2
} is a dominating set of AS-PCD, returns 0 otherwise.
AS proximity regions are defined with respect to the triangle tri
.
Point, p1
, is in the region of vertex rv1
(default is NULL
)
and point, p2
, is in the region of vertex rv2
(default is NULL
); vertices (and hence rv1
and rv2
)
are labeled as 1,2,3
in the order they are stacked row-wise in tri
.
Vertex regions are based on
the center M="CC"
for circumcenter of tri
; or M=(m_1,m_2)
in Cartesian coordinates
or M=(\alpha,\beta,\gamma)
in barycentric coordinates in the interior of the triangle tri
;
default is M="CC"
the circumcenter of tri
.
ch.data.pnts
is for checking whether points p1
and p2
are data
points in Xp
or not (default is FALSE
), so by default this function checks whether the points p1
and p2
would constitute dominating set if they actually were in the data set.
See also (Ceyhan (2005, 2010)).
Usage
Idom.num2AStri(
p1,
p2,
Xp,
tri,
M = "CC",
rv1 = NULL,
rv2 = NULL,
ch.data.pnts = FALSE
)
Arguments
p1 , p2 |
Two 2D points to be tested for constituting a dominating set of the AS-PCD. |
Xp |
A set of 2D points which constitutes the vertices of the AS-PCD. |
tri |
Three 2D points, stacked row-wise, each row representing a vertex of the triangle. |
M |
The center of the triangle. |
rv1 , rv2 |
The indices of the vertices whose regions contains |
ch.data.pnts |
A logical argument for checking whether points |
Value
I(
{p1,p2
} is a dominating set of the AS-PCD)
where vertices of the AS-PCD are the 2D data set Xp
),
that is, returns 1 if {p1,p2
} is a dominating set of AS-PCD, returns 0 otherwise
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 (2010).
“Extension of One-Dimensional Proximity Regions to Higher Dimensions.”
Computational Geometry: Theory and Applications, 43(9), 721-748.
Ceyhan E (2012).
“An investigation of new graph invariants related to the domination number of random proximity catch digraphs.”
Methodology and Computing in Applied Probability, 14(2), 299-334.
See Also
Examples
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10
set.seed(1)
Xp<-runif.tri(n,Tr)$g
M<-as.numeric(runif.tri(1,Tr)$g) #try also M<-c(1.6,1.2)
Idom.num2AStri(Xp[1,],Xp[2,],Xp,Tr,M)
Idom.num2AStri(Xp[1,],Xp[1,],Xp,Tr,M) #same two points cannot be a dominating set of size 2
Idom.num2AStri(c(.2,.4),Xp[2,],Xp,Tr,M)
Idom.num2AStri(c(.2,.4),c(.2,.5),Xp,Tr,M)
Idom.num2AStri(c(.2,.4),c(.2,.5),rbind(c(.2,.4),c(.2,.5)),Tr,M)
#or try
rv1<-rel.vert.triCC(c(.2,.4),Tr)$rv
rv2<-rel.vert.triCC(c(.2,.5),Tr)$rv
Idom.num2AStri(c(.2,.4),c(.2,.5),rbind(c(.2,.4),c(.2,.5)),Tr,M,rv1,rv2)
ind.gam2<-vector()
for (i in 1:(n-1))
for (j in (i+1):n)
{if (Idom.num2AStri(Xp[i,],Xp[j,],Xp,Tr,M)==1)
ind.gam2<-rbind(ind.gam2,c(i,j))}
ind.gam2
#or try
rv1<-rel.vert.triCC(Xp[1,],Tr)$rv
rv2<-rel.vert.triCC(Xp[2,],Tr)$rv
Idom.num2AStri(Xp[1,],Xp[2,],Xp,Tr,M,rv1,rv2)
#or try
rv1<-rel.vert.triCC(Xp[1,],Tr)$rv
Idom.num2AStri(Xp[1,],Xp[2,],Xp,Tr,M,rv1)
#or try
Rv2<-rel.vert.triCC(Xp[2,],Tr)$rv
Idom.num2AStri(Xp[1,],Xp[2,],Xp,Tr,M,rv2=Rv2)
Idom.num2AStri(c(1.3,1.2),c(1.35,1.25),Xp,Tr,M)