IarcAStri {pcds} | R Documentation |
The indicator for the presence of an arc from a point to another for Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case
Description
Returns I(p2 \in N_{AS}(p1))
for points p1
and p2
,
that is, returns 1 if p2
is in N_{AS}(p1)
, returns 0
otherwise, where N_{AS}(x)
is the AS proximity region for point x
.
AS proximity regions are constructed with respect to the triangle,
tri
=T(A,B,C)=
(rv=1,rv=2,rv=3)
,
and vertex regions are based on the center, M=(m_1,m_2)
in Cartesian coordinates
or M=(\alpha,\beta,\gamma)
in barycentric coordinates
in the interior of the triangle tri
or based on circumcenter of tri
;
default is M="CC"
, i.e., circumcenter of tri
.
rv
is the index of the vertex region p1
resides,
with default=NULL
.
If p1
and p2
are distinct
and either of them are outside tri
, the function returns 0,
but if they are identical,
then it returns 1 regardless of their locations (i.e., it allows loops).
See also (Ceyhan (2005, 2010)).
Usage
IarcAStri(p1, p2, tri, M = "CC", rv = NULL)
Arguments
p1 |
A 2D point whose AS proximity region is constructed. |
p2 |
A 2D point. The function determines whether |
tri |
Three 2D points, stacked row-wise, each row representing a vertex of the triangle. |
M |
The center of the triangle.
|
rv |
The index of the |
Value
I(p2 \in N_{AS}(p1))
for p1
, that is,
returns 1 if p2
is in N_{AS}(p1)
, 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
IarcASbasic.tri
, IarcPEtri
, and IarcCStri
Examples
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
M<-as.numeric(runif.tri(1,Tr)$g) #try also M<-c(1.6,1.2)
P1<-as.numeric(runif.tri(1,Tr)$g)
P2<-as.numeric(runif.tri(1,Tr)$g)
IarcAStri(P1,P2,Tr,M)
P1<-c(1.3,1.2)
P2<-c(1.8,.5)
IarcAStri(P1,P2,Tr,M)
IarcAStri(P1,P1,Tr,M)
#or try
Rv<-rel.vert.triCC(P1,Tr)$rv
IarcAStri(P1,P2,Tr,M,Rv)
P3<-c(1.6,1.4)
IarcAStri(P1,P3,Tr,M)
P4<-c(1.5,1.0)
IarcAStri(P1,P4,Tr,M)
P5<-c(.5,1.0)
IarcAStri(P1,P5,Tr,M)
IarcAStri(P5,P5,Tr,M)
#or try
Rv<-rel.vert.triCC(P5,Tr)$rv
IarcAStri(P5,P5,Tr,M,Rv)