Idom.num1CSint {pcds} | R Documentation |
The indicator for a point being a dominating point for Central Similarity Proximity Catch Digraphs (CS-PCDs) for an interval
Description
Returns I(
p
is a dominating point of CS-PCD)
where the vertices of the CS-PCD are the 1D data set Xp
).
CS proximity region is defined with respect to the interval int
with an expansion parameter, t>0
,
and a centrality parameter, c \in (0,1)
, so arcs may exist for Xp
points inside the interval int
=(a,b)
.
Vertex regions are based on the center associated with the centrality parameter c \in (0,1)
.
rv
is the index of the vertex region p
resides, with default=NULL
.
ch.data.pnt
is for checking whether point p
is a data point in Xp
or not (default is FALSE
),
so by default this function checks whether the point p
would be a dominating point
if it actually were in the data set.
Usage
Idom.num1CSint(p, Xp, int, t, c = 0.5, rv = NULL, ch.data.pnt = FALSE)
Arguments
p |
A 1D point that is to be tested for being a dominating point or not of the CS-PCD. |
Xp |
A set of 1D points which constitutes the vertices of the CS-PCD. |
int |
A |
t |
A positive real number which serves as the expansion parameter in CS proximity region. |
c |
A positive real number in |
rv |
Index of the vertex region in which the point resides, either |
ch.data.pnt |
A logical argument for checking whether point |
Value
I(
p
is a dominating point of CS-PCD)
where the vertices of the CS-PCD are the 1D data set Xp
),
that is, returns 1 if p
is a dominating point, returns 0 otherwise
Author(s)
Elvan Ceyhan
See Also
Examples
t<-2
c<-.4
a<-0; b<-10; int<-c(a,b)
Mc<-centerMc(int,c)
n<-10
set.seed(1)
Xp<-runif(n,a,b)
Idom.num1CSint(Xp[5],Xp,int,t,c)
Idom.num1CSint(2,Xp,int,t,c,ch.data.pnt = FALSE)
#gives an error if ch.data.pnt = TRUE since p is not a data point in Xp
gam.vec<-vector()
for (i in 1:n)
{gam.vec<-c(gam.vec,Idom.num1CSint(Xp[i],Xp,int,t,c))}
ind.gam1<-which(gam.vec==1)
ind.gam1
domset<-Xp[ind.gam1]
if (length(ind.gam1)==0)
{domset<-NA}
#or try
Rv<-rel.vert.mid.int(Xp[5],int,c)$rv
Idom.num1CSint(Xp[5],Xp,int,t,c,Rv)
Xlim<-range(a,b,Xp)
xd<-Xlim[2]-Xlim[1]
plot(cbind(a,0),xlab="",pch=".",xlim=Xlim+xd*c(-.05,.05))
abline(h=0)
abline(v=c(a,b,Mc),col=c(1,1,2),lty=2)
points(cbind(Xp,0))
points(cbind(domset,0),pch=4,col=2)
text(cbind(c(a,b,Mc),-0.1),c("a","b","Mc"))
Idom.num1CSint(Xp[5],Xp,int,t,c)
n<-10
Xp2<-runif(n,a+b,b+10)
Idom.num1CSint(5,Xp2,int,t,c)