Learn R Programming

pcds (version 0.1.4)

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

Description

Returns \(I(\)S a dominating set of CS-PCD whose vertices 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 triangle tri with the expansion parameter \(\tau>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 the triangle tri; default is \(M=(1,1,1)\) i.e., the center of mass of tri.

The triangle tri\(=T(A,B,C)\) has edges \(AB\), \(BC\), \(AC\) which are also labeled as edges 3, 1, and 2, respectively.

See also (ceyhan:mcap2012;textualpcds).

Usage

IndNCStri.domset(S, Dt, tau, tri, 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 whose vertices are the data points in Dt; returns 0 otherwise, where CS proximity region is constructed in the triangle tri

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.

tau

A positive real number which serves as the expansion parameter in CS proximity region constructed in the triangle tri.

tri

Three 2D points, stacked row-wise, each row representing a vertex of the triangle.

M

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

Author

Elvan Ceyhan

References

See Also

IndCSTe.domset, IndNPEtri.domset and IndNAStri.domset

Examples

Run this code
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
dat<-runif.tri(n,Tr)$gen.points

M<-as.numeric(runif.tri(1,Tr)$g)  #try also M<-c(1.6,1.0)

tau<-.5

S<-rbind(dat[1,],dat[2,])
IndNCStri.domset(S,dat,tau,Tr,M)

S<-rbind(dat[1,],dat[2,],dat[3,],dat[5,])
IndNCStri.domset(S,dat,tau,Tr,M)

S<-rbind(c(.1,.1),c(.3,.4),c(.5,.3))
IndNCStri.domset(S,dat,tau,Tr,M)

IndNCStri.domset(c(.2,.5),dat,tau,Tr,M)
IndNCStri.domset(c(.2,.5),c(.2,.5),tau,Tr,M)
IndNCStri.domset(dat[5,],dat[2,],tau,Tr,M)

S<-rbind(dat[1,],dat[2,],dat[3,],dat[5,],c(.2,.5))
IndNCStri.domset(S,dat[3,],tau,Tr,M)

IndNCStri.domset(dat,dat,tau,Tr,M)

P<-c(.4,.2)
S<-dat[c(1,3,4),]
IndNCStri.domset(dat,P,tau,Tr,M)
IndNCStri.domset(S,P,tau,Tr,M)
IndNCStri.domset(S,dat,tau,Tr,M)

IndNCStri.domset(rbind(S,S),dat,tau,Tr,M)

dat.fr<-data.frame(a=dat)
IndNCStri.domset(S,dat.fr,tau,Tr,M)

Run the code above in your browser using DataLab