Learn R Programming

pcds (version 0.1.4)

IndCSTe.domset: The indicator for the set of points S being a dominating set or not for Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle case

Description

Returns \(I(\)S a dominating set of the CS-PCD\()\) where the vertices of the CS-PCD are the data set Dt), that is, returns 1 if S is a dominating set of CS-PCD, returns 0 otherwise.

CS proximity region is constructed with respect to the standard equilateral triangle \(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 the center \(M=(m_1,m_2)\) in Cartesian coordinates or \(M=(\alpha,\beta,\gamma)\) in barycentric coordinates in the interior of \(T_e\); default is \(M=(1,1,1)\) i.e., the center of mass of \(T_e\) (which is equivalent to the circumcenter of \(T_e\)).

Edges of \(T_e\), \(AB\), \(BC\), \(AC\), are also labeled as 3, 1, and 2, respectively.

See also (ceyhan:mcap2012;textualpcds).

Usage

IndCSTe.domset(S, Dt, t, M = c(1, 1, 1))

Value

\(I(\)S a dominating set of the CS-PCD\()\), that is, returns 1 if S is a dominating set of CS-PCD, returns 0 otherwise, where CS proximity region is constructed in the standard equilateral triangle \(T_e\)

Arguments

S

A set of 2D points which is to be tested for being a dominating set for the CS-PCDs.

Dt

A set of 2D points which constitute the vertices of the CS-PCD.

t

A positive real number which serves as the expansion parameter in CS proximity region in the standard equilateral triangle \(T_e=T((0,0),(1,0),(1/2,\sqrt{3}/2))\).

M

A 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the standard equilateral triangle \(T_e\); default is \(M=(1,1,1)\) i.e. the center of mass of \(T_e\).

Author

Elvan Ceyhan

References

See Also

IndNCStri.domset and IndNPETe.domset

Examples

Run this code
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C);
n<-10

set.seed(1)
dat<-runifTe(n)$gen.points

M<-as.numeric(runifTe(1)$g)  #try also M<-c(.6,.2)

t<-.5

S<-rbind(dat[1,],dat[2,])
IndCSTe.domset(S,dat,t,M)

S<-rbind(dat[1,],dat[2,],dat[3,],dat[5,])
IndCSTe.domset(S,dat,t,M)

S<-rbind(c(.1,.1),c(.3,.4),c(.5,.3))
IndCSTe.domset(S,dat,t,M)

IndCSTe.domset(c(.2,.5),dat,t,M)
IndCSTe.domset(c(.2,.5),c(.2,.5),t,M)
IndCSTe.domset(dat[5,],dat[2,],t,M)

S<-rbind(dat[1,],dat[2,],dat[3,],dat[5,],c(.2,.5))
IndCSTe.domset(S,dat[3,],t,M)

IndCSTe.domset(dat,dat,t,M)

P<-c(.4,.2)
S<-dat[c(1,3,4),]
IndCSTe.domset(dat,P,t,M)
IndCSTe.domset(S,P,t,M)
IndCSTe.domset(S,dat,t,M)

IndCSTe.domset(rbind(S,S),dat,t,M)

dat.fr<-data.frame(a=dat)
IndCSTe.domset(S,dat.fr,t,M)

Run the code above in your browser using DataLab