funsCSGamTe | R Documentation |
gammakCSstd.tri
is for k
(k=2,3,4,5
) points constituting a dominating set for Central Similarity
Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle caseFour indicator functions: Idom.num2CSstd.tri
, Idom.num3CSstd.tri
, Idom.num4CSstd.tri
, Idom.num5CSstd.tri
and Idom.num6CSstd.tri
.
The function gammakCSstd.tri
returns I({p1
,...,pk
} is a dominating set of the CS-PCD)
where vertices of CS-PCD are the 2D data set Xp
, that is, returns 1 if {p1
,...,pk
}
is a dominating set of CS-PCD, returns 0 otherwise for k=2,3,4,5,6
.
CS proximity region is constructed with respect to T_e=T(A,B,C)=T((0,0),(1,0),(1/2,\sqrt{3}/2))
with expansion parameter t>0
and edge regions are based on center of mass CM=(1/2,\sqrt{3}/6)
.
ch.data.pnts
is for checking whether points p1
,...,pk
are data points in Xp
or not
(default is FALSE
), so by default this function checks whether the points p1
,...,pk
would be a
dominating set if they actually were in the data set.
See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
Idom.num2CSstd.tri(p1, p2, Xp, t, ch.data.pnts = FALSE)
Idom.num3CSstd.tri(p1, p2, p3, Xp, t, ch.data.pnts = FALSE)
Idom.num4CSstd.tri(p1, p2, p3, p4, Xp, t, ch.data.pnts = FALSE)
Idom.num5CSstd.tri(p1, p2, p3, p4, p5, Xp, t, ch.data.pnts = FALSE)
Idom.num6CSstd.tri(p1, p2, p3, p4, p5, p6, Xp, t, ch.data.pnts = FALSE)
p1 , p2 , p3 , p4 , p5 , p6 |
The points { |
Xp |
A set of 2D points which constitutes the vertices of the CS-PCD. |
t |
A positive real number which serves as the expansion parameter in CS proximity region. |
ch.data.pnts |
A logical argument for checking whether points { |
The function gammakCSstd.tri
returns {p1
,...,pk
} is a dominating set of the CS-PCD) where
vertices of the CS-PCD are the 2D data set Xp
), that is, returns 1 if {p1
,...,pk
}
is a dominating set of CS-PCD, returns 0 otherwise.
Elvan Ceyhan
Idom.num1CSstd.tri
, Idom.num2PEtri
and Idom.num2PEtetra
set.seed(123)
#Examples for Idom.num2CSstd.tri
t<-1.5
n<-10 #try also 10, 20 (it may take longer for larger n)
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num2CSstd.tri(Xp[1,],Xp[2,],Xp,t)
Idom.num2CSstd.tri(c(.2,.2),Xp[2,],Xp,t)
ind.gam2<-vector()
for (i in 1:(n-1))
for (j in (i+1):n)
{if (Idom.num2CSstd.tri(Xp[i,],Xp[j,],Xp,t)==1)
ind.gam2<-rbind(ind.gam2,c(i,j))}
ind.gam2
#Examples for Idom.num3CSstd.tri
t<-1.5
n<-10 #try also 10, 20 (it may take longer for larger n)
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num3CSstd.tri(Xp[1,],Xp[2,],Xp[3,],Xp,t)
ind.gam3<-vector()
for (i in 1:(n-2))
for (j in (i+1):(n-1))
for (k in (j+1):n)
{if (Idom.num3CSstd.tri(Xp[i,],Xp[j,],Xp[k,],Xp,t)==1)
ind.gam3<-rbind(ind.gam3,c(i,j,k))}
ind.gam3
#Examples for Idom.num4CSstd.tri
t<-1.5
n<-10 #try also 10, 20 (it may take longer for larger n)
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num4CSstd.tri(Xp[1,],Xp[2,],Xp[3,],Xp[4,],Xp,t)
ind.gam4<-vector()
for (i in 1:(n-3))
for (j in (i+1):(n-2))
for (k in (j+1):(n-1))
for (l in (k+1):n)
{if (Idom.num4CSstd.tri(Xp[i,],Xp[j,],Xp[k,],Xp[l,],Xp,t)==1)
ind.gam4<-rbind(ind.gam4,c(i,j,k,l))}
ind.gam4
Idom.num4CSstd.tri(c(.2,.2),Xp[2,],Xp[3,],Xp[4,],Xp,t,ch.data.pnts = FALSE)
#gives an error message if ch.data.pnts = TRUE since not all points are data points in Xp
#Examples for Idom.num5CSstd.tri
t<-1.5
n<-10 #try also 10, 20 (it may take longer for larger n)
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num5CSstd.tri(Xp[1,],Xp[2,],Xp[3,],Xp[4,],Xp[5,],Xp,t)
ind.gam5<-vector()
for (i1 in 1:(n-4))
for (i2 in (i1+1):(n-3))
for (i3 in (i2+1):(n-2))
for (i4 in (i3+1):(n-1))
for (i5 in (i4+1):n)
{if (Idom.num5CSstd.tri(Xp[i1,],Xp[i2,],Xp[i3,],Xp[i4,],Xp[i5,],Xp,t)==1)
ind.gam5<-rbind(ind.gam5,c(i1,i2,i3,i4,i5))}
ind.gam5
Idom.num5CSstd.tri(c(.2,.2),Xp[2,],Xp[3,],Xp[4,],Xp[5,],Xp,t,ch.data.pnts = FALSE)
#gives an error message if ch.data.pnts = TRUE since not all points are data points in Xp
#Examples for Idom.num6CSstd.tri
t<-1.5
n<-10 #try also 10, 20 (it may take longer for larger n)
set.seed(1)
Xp<-runif.std.tri(n)$gen.points
Idom.num6CSstd.tri(Xp[1,],Xp[2,],Xp[3,],Xp[4,],Xp[5,],Xp[6,],Xp,t)
ind.gam6<-vector()
for (i1 in 1:(n-5))
for (i2 in (i1+1):(n-4))
for (i3 in (i2+1):(n-3))
for (i4 in (i3+1):(n-2))
for (i5 in (i4+1):(n-1))
for (i6 in (i5+1):n)
{if (Idom.num6CSstd.tri(Xp[i1,],Xp[i2,],Xp[i3,],Xp[i4,],Xp[i5,],Xp[i6,],Xp,t)==1)
ind.gam6<-rbind(ind.gam6,c(i1,i2,i3,i4,i5,i6))}
ind.gam6
Idom.num6CSstd.tri(c(.2,.2),Xp[2,],Xp[3,],Xp[4,],Xp[5,],Xp[6,],Xp,t,ch.data.pnts = FALSE)
#gives an error message if ch.data.pnts = TRUE since not all points are data points in Xp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.