View source: R/ArcSliceFunctions.R
Idom.setAStri | R Documentation |
S
being a dominating set or not for Arc Slice Proximity
Catch Digraphs (AS-PCDs) - one triangle caseReturns I(
S
a dominating set of AS-PCD)
, that is, returns 1 if S
is a dominating set of AS-PCD,
returns 0 otherwise.
AS-PCD has vertex set Xp
and AS proximity region is constructed with 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
whose vertices are also labeled as edges 1, 2, and 3, respectively.
See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
Idom.setAStri(S, Xp, tri, M = "CC")
S |
A set of 2D points which is to be tested for being a dominating set for the AS-PCDs. |
Xp |
A set of 2D points which constitute 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. |
I(
S
a dominating set of AS-PCD)
, that is, returns 1 if S
is a dominating set of AS-PCD whose
vertices are the data points in Xp
; returns 0 otherwise, where AS proximity region is constructed in
the triangle tri
.
Elvan Ceyhan
IarcASset2pnt.tri
, Idom.setPEtri
and Idom.setCStri
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)$gen.points
M<-as.numeric(runif.tri(1,Tr)$g) #try also M<-c(1.6,1.2)
S<-rbind(Xp[1,],Xp[2,])
Idom.setAStri(S,Xp,Tr,M)
S<-rbind(Xp[1,],Xp[2,],Xp[3,],Xp[5,])
Idom.setAStri(S,Xp,Tr,M)
S<-rbind(c(.1,.1),c(.3,.4),c(.5,.3))
Idom.setAStri(S,Xp,Tr,M)
Idom.setAStri(c(.2,.5),Xp,Tr,M)
Idom.setAStri(c(.2,.5),c(.2,.5),Tr,M)
Idom.setAStri(Xp[5,],Xp[2,],Tr,M)
S<-rbind(Xp[1,],Xp[2,],Xp[3,],Xp[5,],c(.2,.5))
Idom.setAStri(S,Xp[3,],Tr,M)
Idom.setAStri(Xp,Xp,Tr,M)
P<-c(.4,.2)
S<-Xp[c(1,3,4),]
Idom.setAStri(Xp,P,Tr,M)
Idom.setAStri(S,P,Tr,M)
Idom.setAStri(S,Xp,Tr,M)
Idom.setAStri(rbind(S,S),Xp,Tr,M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.