Learn R Programming

pcds (version 0.1.2)

funsCSt1EdgeRegs: Each function is for the presence of an arc from a point in one of the edge regions to another for Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle case with \(t=1\)

Description

Three indicator functions: IndCSTeRABt1, IndCSTeRBCt1 and IndCSTeRACt1.

The function IndCSTeRABt1 returns \(I(\)pt2 is in \(N_{CS}(pt1,t=1)\) for pt1 in \(RAB\) (edge region for edge \(AB\), i.e., edge 3) in the standard equilateral triangle \(T_e=T(A,B,C)=T((0,0),(1,0),(1/2,\sqrt{3}/2))\);

IndCSTeRBCt1 returns \(I(\)pt2 is in \(N_{CS}(pt1,t=1)\) for pt1 in \(RBC\) (edge region for edge \(BC\), i.e., edge 1) in \(T_e\); and

IndCSTeRACt1 returns \(I(\)pt2 is in \(N_{CS}(pt1,t=1)\) for pt1 in \(RAC\) (edge region for edge \(AC\), i.e., edge 2) in \(T_e\).

That is, each function returns 1 if pt2 is in \(N_{CS}(pt1,t=1)\), returns 0 otherwise, where \(N_{CS}(x,t)\) is the CS proximity region for point \(x\) with expansion parameter \(t=1\).

Usage

IndCSTeRABt1(pt1, pt2)

IndCSTeRBCt1(pt1, pt2)

IndCSTeRACt1(pt1, pt2)

Arguments

pt1

A 2D point whose CS proximity region is constructed.

pt2

A 2D point. The function determines whether pt2 is inside the CS proximity region of pt1 or not.

Value

Each function returns \(I(\)pt2 is in \(N_{CS}(pt1,t=1))\) for pt1, that is, returns 1 if pt2 is in \(N_{CS}(pt1,t=1)\), returns 0 otherwise

See Also

IndCSTeRAB, IndCSTeRBC and IndCSTeRAC

Examples

Run this code
# NOT RUN {
#Examples for IndCSTeRABt1
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
CM<-(A+B+C)/3
T3<-rbind(A,B,CM);

set.seed(1)
dat3<-runif.tri(10,T3)$g
dat<-runifTe(10)$gen.points

IndCSTeRABt1(dat3[1,],dat[2,])
IndCSTeRABt1(dat3[1,],dat3[1,])
IndCSTeRABt1(dat[2,],dat[2,])

IndCSTeRABt1(dat3[1,],dat3[3,])
IndCSTeRABt1(c(.2,.5),dat[2,])
IndCSTeRABt1(c(.2,.5),c(.2,.5))

#Examples for IndCSTeRBCt1
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
CM<-(A+B+C)/3
T1<-rbind(B,C,CM);

set.seed(1)
dat1<-runif.tri(10,T1)$g
dat<-runifTe(10)$gen.points

IndCSTeRBCt1(dat1[1,],dat[2,])
IndCSTeRBCt1(dat1[1,],dat1[1,])
IndCSTeRBCt1(dat[2,],dat[2,])

IndCSTeRBCt1(dat1[1,],dat1[3,])
IndCSTeRBCt1(c(.2,.5),dat[2,])
IndCSTeRBCt1(c(.2,.5),c(.2,.5))

IndCSTeRBCt1(dat[2,],dat[2,])

#Examples for IndCSTeRACt1
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
CM<-(A+B+C)/3
T2<-rbind(A,C,CM);

set.seed(1)
dat2<-runif.tri(10,T2)$g
dat<-runifTe(10)$gen.points

IndCSTeRACt1(dat2[1,],dat[2,])
IndCSTeRACt1(dat2[1,],dat2[1,])
IndCSTeRACt1(dat[2,],dat[2,])

IndCSTeRACt1(dat2[1,],dat2[3,])
IndCSTeRACt1(c(1,2),c(1,2))

IndCSTeRACt1(dat[2,],dat[2,])

# }

Run the code above in your browser using DataLab