Learn R Programming

pcds (version 0.1.1)

IndNCSmid1D: The indicator for the presence of an arc from a point to another for Central Similarity Proximity Catch Digraphs (CS-PCDs) - middle interval case

Description

Returns I(x2 in \(NCS(x1,t,c)\)) for points x1 and x2, that is, returns 1 if x2 is in \(NCS(x1,t,c)\), returns 0 otherwise, where \(NCS(x,t,c)\) is the CS proximity region for point \(x\) and is constructed with expansion parameter \(t>0\) and centrality parameter c in \((0,1)\) for the interval \((a,b)\).

CS proximity regions are defined with respect to the middle interval int and vertex regions are based on the center associated with the centrality parameter c in \((0,1)\). For the interval, \(int=(a,b)\), the parameterized center is \(M_c=a+c(b-a)\) . rv is the index of the vertex region x1 resides, with default=NULL.

If x1 and x2 are distint and either of them are outside interval int, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., loops are allowed in the digraph).

See also (ceyhan:revstat-2016;textualpcds).

Usage

IndNCSmid1D(x1, x2, t, c, int, rv = NULL)

Arguments

x1, x2

1D points; x1 is the point for which the proximity region, \(NCS(x1,t,c)\) is constructed and x2 is the point which the function is checking whether its inside \(NCS(x1,t,c)\) or not.

t

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

c

A positive real number in \((0,1)\) parameterizing the center inside int.

int

A vector of two real numbers representing an interval.

rv

Index of the end interval containing the point, either 1, 2 or NULL (default is NULL).

Value

I(x2 in \(NCS(x1,t,c)\)) for points x1 and x2 that is, returns 1 if x2 is in \(NCS(x1,t,c)\), returns 0 otherwise

References

See Also

IndNCSend1D, IndNPEmid1D, and IndNPEend1D

Examples

Run this code
# NOT RUN {
c<-.5
t<-2
a<-0; b<-10; int<-c(a,b)

IndNCSmid1D(7,5,t,c,int)
IndNCSmid1D(7,7,t,c,int)
IndNCSmid1D(7,5,t,c=.4,int)

IndNCSmid1D(1,3,t,c,int)

IndNCSmid1D(9,11,t,c,int)

IndNCSmid1D(19,1,t,c,int)
IndNCSmid1D(19,19,t,c,int)

IndNCSmid1D(3,5,t,c,int)

#or try
Rv<-rv.mid.int(3,c,int)$rv
IndNCSmid1D(3,5,t,c,int,rv=Rv)

IndNCSmid1D(7,5,t,c,int)

# }

Run the code above in your browser using DataLab