Type: Package
Title: Underlying Graphs of Proximity Catch Digraphs and Their Applications
Version: 0.1.1
Description: Contains the functions for construction and visualization of underlying and reflexivity graphs of the three families of the proximity catch digraphs (PCDs), see (Ceyhan (2005) ISBN:978-3-639-19063-2), and for computing the edge density of these PCD-based graphs which are then used for testing the patterns of segregation and association against complete spatial randomness (CSR)) or uniformity in one and two dimensional cases. The PCD families considered are Arc-Slice PCDs, Proportional-Edge (PE) PCDs (Ceyhan et al. (2006) <doi:10.1016/j.csda.2005.03.002>) and Central Similarity PCDs (Ceyhan et al. (2007) <doi:10.1002/cjs.5550350106>). See also (Ceyhan (2016) <doi:10.1016/j.stamet.2016.07.003>) for edge density of the underlying and reflexivity graphs of PE-PCDs. The package also has tools for visualization of PCD-based graphs for one, two, and three dimensional data.
License: GPL-2
Encoding: UTF-8
Imports: pcds, interp, Rdpack (≥ 0.7)
Depends: R (≥ 3.5.0)
RdMacros: Rdpack
Suggests: knitr, scatterplot3d, rmarkdown, bookdown, spelling
RoxygenNote: 7.2.3
Language: en-US
NeedsCompilation: no
Packaged: 2023-12-19 16:47:33 UTC; ezc0066
Author: Elvan Ceyhan [aut, cre]
Maintainer: Elvan Ceyhan <elvanceyhan@gmail.com>
Repository: CRAN
Date/Publication: 2023-12-19 17:40:02 UTC

pcds.ugraph: A package for the Underlying and Reflexivity Graphs of the Proximity Catch Digraphs and Their Applications

Description

pcds.ugraph is a package for construction and visualization of the underlying graphs based on proximity catch digraphs and for computation of edge density of these graphs for testing spatial patterns.

Details

The PCD families considered are Arc-Slice PCDs, Proportional-Edge PCDs and Central Similarity PCDs (Ceyhan (2005); Ceyhan et al. (2006); Ceyhan et al. (2007)).

The graph invariant used in testing spatial point data are the edge density of the underlying and reflexivity graphs of the PCDs (see Ceyhan (2016)).

The package also contains visualization tools for these graphs for 1D-3D vertices. The AS-PCD and CS-PCD related tools are provided for 1D and 2D data; PE-PCD related tools are provided for 1D-3D data.

The pcds.ugraph functions

The pcds.ugraph functions can be grouped as AS-PCD Functions, PE-PCD Functions, and CS-PCD Functions.

Arc-Slice PCD Functions

Contains the functions used in AS-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.

Proportional-Edge PCD Functions

Contains the functions used in PE-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.

Central-Similarity PCD Functions

Contains the functions used in CS-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.

Author(s)

Maintainer: Elvan Ceyhan elvanceyhan@gmail.com

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Ceyhan E, Priebe CE, Marchette DJ (2007). “A new family of random graphs for testing spatial segregation.” Canadian Journal of Statistics, 35(1), 27-50.

Ceyhan E, Priebe CE, Wierman JC (2006). “Relative density of the random r-factor proximity catch digraphs for testing spatial patterns of segregation and association.” Computational Statistics & Data Analysis, 50(8), 1925-1964.


.onAttach start message

Description

.onAttach start message

Usage

.onAttach(libname, pkgname)

Arguments

libname

defunct

pkgname

defunct

Value

invisible()


.onLoad getOption package settings

Description

.onLoad getOption package settings

Usage

.onLoad(libname, pkgname)

Arguments

libname

defunct

pkgname

defunct

Value

invisible()

Examples

getOption("pcds.ugraph.name")

Edge density of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case

Description

Returns the edge density of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) whose vertex set is the given 2D numerical data set, Xp, (some of its members are) in the triangle tri.

AS proximity regions are defined with respect to tri and vertex regions are defined with the center M="CC" for circumcenter of tri; or 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="CC", i.e., circumcenter of tri. For the number of edges, loops are not allowed so edges are only possible for points inside tri for this function.

in.tri.only is a logical argument (default is FALSE) for considering only the points inside the triangle or all the points as the vertices of the digraph. if in.tri.only=TRUE, edge density is computed only for the points inside the triangle (i.e., edge density of the subgraph of the underlying or reflexivity graph induced by the vertices in the triangle is computed), otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

See also (Ceyhan (2005, 2016)).

Usage

ASedge.dens.tri(
  Xp,
  tri,
  M = "CC",
  ugraph = c("underlying", "reflexivity"),
  in.tri.only = FALSE
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

M

The center of the triangle. "CC" stands for circumcenter of the triangle tri or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of tri; default is M="CC", i.e., the circumcenter of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

in.tri.only

A logical argument (default is in.tri.only=FALSE) for computing the edge density for only the points inside the triangle, tri. That is, if in.tri.only=TRUE edge density of the induced subgraph with the vertices inside tri is computed, otherwise otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

Value

Edge density of the underlying or reflexivity graphs based on the AS-PCD whose vertices are the 2D numerical data set, Xp; AS proximity regions are defined with respect to the triangle tri and M-vertex regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

PEedge.dens.tri, CSedge.dens.tri, and ASarc.dens.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

#For the underlying graph
(num.edgesAStri(Xp,Tr,M)$num.edges)/(n*(n-1)/2)
ASedge.dens.tri(Xp,Tr,M)
ASedge.dens.tri(Xp,Tr,M,in.tri.only = TRUE)

#For the reflexivity graph
(num.edgesAStri(Xp,Tr,M,ugraph="r")$num.edges)/(n*(n-1)/2)
ASedge.dens.tri(Xp,Tr,M,ugraph="r")
ASedge.dens.tri(Xp,Tr,M,in.tri.only = TRUE,ugraph="r")
#}


A test of segregation/association based on edge density of underlying or reflexivity graph of Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data

Description

An object of class "htest" (i.e., hypothesis test) function which performs a hypothesis test of complete spatial randomness (CSR) or uniformity of Xp points in the convex hull of Yp points against the alternatives of segregation (where Xp points cluster away from Yp points) and association (where Xp points cluster around Yp points) based on the normal approximation of the edge density of the underlying or reflexivity graph of CS-PCD for uniform 2D data.

The function yields the test statistic, p-value for the corresponding alternative, the confidence interval, estimate and null value for the parameter of interest (which is the edge density), and method and name of the data set used.

Under the null hypothesis of uniformity of Xp points in the convex hull of Yp points, edge density of underlying or reflexivity graph of CS-PCD whose vertices are Xp points equals to its expected value under the uniform distribution and alternative could be two-sided, or left-sided (i.e., data is accumulated around the Yp points, or association) or right-sided (i.e., data is accumulated around the centers of the triangles, or segregation).

CS proximity region is constructed with the expansion parameter t > 0 and CM-edge regions (i.e., the test is not available for a general center M at this version of the function).

**Caveat:** This test is currently a conditional test, where Xp points are assumed to be random, while Yp points are assumed to be fixed (i.e., the test is conditional on Yp points). Furthermore, the test is a large sample test when Xp points are substantially larger than Yp points, say at least 5 times more. This test is more appropriate when supports of Xp and Yp have a substantial overlap. Currently, the Xp points outside the convex hull of Yp points are handled with a correction factor which is derived under the assumption of uniformity of Xp and Yp points in the study window, (see the description below for the argument ch.cor and the function code.) However, in the special case of no Xp points in the convex hull of Yp points, edge density is taken to be 1, as this is clearly a case of segregation. Removing the conditioning and extending it to the case of non-concurring supports is an ongoing topic of research of the author of the package.

ch.cor is for convex hull correction (default is "no convex hull correction", i.e., ch.cor=FALSE) which is recommended when both Xp and Yp have the same rectangular support.

See also (Ceyhan (2005, 2016)) for more on the test based on the edge density of underlying or reflexivity graphs of CS-PCDs.

Usage

CSedge.dens.test(
  Xp,
  Yp,
  t,
  ugraph = c("underlying", "reflexivity"),
  ch.cor = FALSE,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

t

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

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

ch.cor

A logical argument for convex hull correction, default ch.cor=FALSE, recommended when both Xp and Yp have the same rectangular support.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater".

conf.level

Level of the confidence interval, default is 0.95, for the edge density of underlying or reflexivity graphs of CS-PCD based on the 2D data set Xp.

Value

A list with the elements

statistic

Test statistic

p.value

The p-value for the hypothesis test for the corresponding alternative

conf.int

Confidence interval for the edge density at the given confidence level conf.level and depends on the type of alternative.

estimate

Estimate of the parameter, i.e., edge density

null.value

Hypothesized value for the parameter, i.e., the null edge density, which is usually the mean edge density under uniform distribution.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater"

method

Description of the hypothesis test

data.name

Name of the data set

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

PEedge.dens.test and CSarc.dens.test

Examples


#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-100; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")

CSedge.dens.test(Xp,Yp,t=1.5)
CSedge.dens.test(Xp,Yp,t=1.5,ch=TRUE)

CSedge.dens.test(Xp,Yp,t=1.5,ugraph="r")
CSedge.dens.test(Xp,Yp,t=1.5,ugraph="r",ch=TRUE)
#since Y points are not uniform, convex hull correction is invalid here




Edge density of the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - one triangle case

Description

Returns the edge density of the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) whose vertex set is the given 2D numerical data set, Xp, (some of its members are) in the triangle tri.

CS proximity regions is defined with respect to tri with expansion parameter t > 0 and edge regions are based on 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 function also provides edge density standardized by the mean and asymptotic variance of the edge density of the underlying or reflexivity graphs of CS-PCD for uniform data in the triangle tri only when M is the center of mass. For the number of edges, loops are not allowed.

in.tri.only is a logical argument (default is FALSE) for considering only the points inside the triangle or all the points as the vertices of the digraph. if in.tri.only=TRUE, edge density is computed only for the points inside the triangle (i.e., edge density of the subgraph of the underlying or reflexivity graph induced by the vertices in the triangle is computed), otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

See also (Ceyhan (2005, 2016)).

Usage

CSedge.dens.tri(
  Xp,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  in.tri.only = FALSE
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

in.tri.only

A logical argument (default is in.tri.only=FALSE) for computing the edge density for only the points inside the triangle, tri. That is, if in.tri.only=TRUE edge density of the induced subgraph with the vertices inside tri is computed, otherwise otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

Value

A list with the elements

edge.dens

Edge density of the underlying or reflexivity graphs based on the CS-PCD whose vertices are the 2D numerical data set, Xp; CS proximity regions are defined with respect to the triangle tri and M-edge regions

std.edge.dens

Edge density standardized by the mean and asymptotic variance of the edge density of the underlying or reflexivity graphs based on the CS-PCD for uniform data in the triangle tri. This will only be returned, if M is the center of mass.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

ASedge.dens.tri, PEedge.dens.tri, and CSarc.dens.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

#For the underlying graph
num.edgesCStri(Xp,Tr,t=1.5,M)$num.edges
CSedge.dens.tri(Xp,Tr,t=1.5,M)
CSedge.dens.tri(Xp,Tr,t=1.5,M,in.tri.only = TRUE)

#For the reflexivity graph
num.edgesCStri(Xp,Tr,t=1.5,M,ugraph="r")$num.edges
CSedge.dens.tri(Xp,Tr,t=1.5,M,ugraph="r")
CSedge.dens.tri(Xp,Tr,t=1.5,M,in.tri.only = TRUE,ugraph="r")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - standard basic triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of AS-PCDs ) for points p1 and p2 in the standard basic triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the AS-PCD underlying graph, that is, returns 1 if p2 is in N_{AS}(p1) **or** p1 is in N_{AS}(p2), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the AS-PCD reflexivity graph, that is, returns 1 if p2 is in N_{AS}(p1) **and** p1 is in N_{AS}(p2), returns 0 otherwise.

AS proximity region is constructed in the standard basic triangle T_b=T((0,0),(1,0),(c_1,c_2)) where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \leq 1.

Vertex 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 standard basic triangle T_b or based on circumcenter of T_b; default is M="CC", i.e., circumcenter of T_b.

If p1 and p2 are distinct and either of them are outside T_b, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

Any given triangle can be mapped to the standard basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

See also (Ceyhan (2005, 2010)).

Usage

IedgeASbasic.tri(
  p1,
  p2,
  c1,
  c2,
  M = "CC",
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose AS proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p1 or not in the underlying or reflexivity graph of AS-PCDs.

c1, c2

Positive real numbers which constitute the vertex of the standard basic triangle adjacent to the shorter edges; c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

M

The center of the triangle. "CC" stands for circumcenter of the triangle T_b or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of T_b; default is M="CC", i.e., the circumcenter of T_b.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of AS-PCDs in the standard basic triangle, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgeAStri, IedgeCSbasic.tri, IedgePEbasic.tri and IarcASbasic.tri

Examples

#\donttest{
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);

M<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
set.seed(4)
P1<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
P2<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
IedgeASbasic.tri(P1,P2,c1,c2,M)
IedgeASbasic.tri(P1,P2,c1,c2,M,ugraph = "reflexivity")

P1<-c(.4,.2)
P2<-c(.5,.26)
IedgeASbasic.tri(P1,P2,c1,c2,M)
IedgeASbasic.tri(P1,P2,c1,c2,M,ugraph="r")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of AS-PCDs ) for points p1 and p2 in a given triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the AS-PCD underlying graph, that is, returns 1 if p2 is in N_{AS}(p1) **or** p1 is in N_{AS}(p2), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the AS-PCD reflexivity graph, that is, returns 1 if p2 is in N_{AS}(p1) **and** p1 is in N_{AS}(p2), returns 0 otherwise.

In both cases AS proximity region is constructed with respect to the triangle tri and vertex 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 or based on circumcenter of tri; default is M="CC", i.e., circumcenter of tri.

If p1 and p2 are distinct and either of them are outside tri, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

See also (Ceyhan (2005, 2016)).

Usage

IedgeAStri(p1, p2, tri, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

p1

A 2D point whose AS proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p1 or not in the underlying or reflexivity graph of AS-PCDs.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

M

The center of the triangle. "CC" stands for circumcenter of the triangle tri or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of tri; default is M="CC", i.e., the circumcenter of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of AS-PCDs in a given triangle tri, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgeASbasic.tri, IedgePEtri, IedgeCStri and IarcAStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
M<-as.numeric(pcds::runif.tri(1,Tr)$g)

n<-3
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

IedgeAStri(Xp[1,],Xp[3,],Tr,M)
IedgeAStri(Xp[1,],Xp[3,],Tr,M,ugraph = "reflexivity")

set.seed(1)
P1<-as.numeric(pcds::runif.tri(1,Tr)$g)
P2<-as.numeric(pcds::runif.tri(1,Tr)$g)
IedgeAStri(P1,P2,Tr,M)
IedgeAStri(P1,P2,Tr,M,ugraph="r")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard basic triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of CS-PCDs ) for points p1 and p2 in the standard basic triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the CS-PCD underlying graph, that is, returns 1 if p2 is in N_{CS}(p1,t) or p1 is in N_{CS}(p2,t), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the CS-PCD reflexivity graph, that is, returns 1 if p2 is in N_{CS}(p1,t) and p1 is in N_{CS}(p2,t), returns 0 otherwise.

In both cases N_{CS}(x,t) is the CS proximity region for point x with expansion parameter t > 0. CS proximity region is defined with respect to the standard basic triangle T_b=T((0,0),(1,0),(c_1,c_2)) where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

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 standard basic triangle T_b; default is M=(1,1,1), i.e., the center of mass of T_b.

If p1 and p2 are distinct and either of them are outside T_b, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

Any given triangle can be mapped to the standard basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

See also (Ceyhan (2005, 2010)).

Usage

IedgeCSbasic.tri(
  p1,
  p2,
  t,
  c1,
  c2,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose CS proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graphs of CS-PCDs.

t

A positive real number which serves as the expansion parameter in CS proximity region; must be > 0

c1, c2

Positive real numbers which constitute the vertex of the standard basic triangle adjacent to the shorter edges; c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

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 basic triangle; default is M=(1,1,1) i.e., the center of mass of T_b.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of CS-PCDs in the standard basic triangle, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgeCStri, IedgeASbasic.tri, IedgePEbasic.tri and IarcCSbasic.tri

Examples

#\donttest{
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);

M<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)

t<-1.5

P1<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
P2<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
IedgeCSbasic.tri(P1,P2,t,c1,c2,M)
IedgeCSbasic.tri(P1,P2,t,c1,c2,M,ugraph = "reflexivity")

P1<-c(.4,.2)
P2<-c(.5,.26)
IedgeCSbasic.tri(P1,P2,t=2,c1,c2,M)
IedgeCSbasic.tri(P1,P2,t=2,c1,c2,M,ugraph="ref")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of CS-PCDs ) for points p1 and p2 in the standard equilateral triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for points p1 and p2 in the standard equilateral triangle, for the CS-PCD underlying graph, that is, returns 1 if p2 is in N_{CS}(p1,t) or p1 is in N_{CS}(p2,t), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for points p1 and p2 in the standard equilateral triangle, for the CS-PCD reflexivity graph, that is, returns 1 if p2 is in N_{CS}(p1,t) and p1 is in N_{CS}(p2,t), returns 0 otherwise.

In both cases N_{CS}(x,t) is the CS proximity region for point x with expansion parameter t > 0. CS proximity region is defined with respect to the standard equilateral triangle T_e=T(v=1,v=2,v=3)=T((0,0),(1,0),(1/2,\sqrt{3}/2)) 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.

If p1 and p2 are distinct and either of them are outside T_e, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

See also (Ceyhan (2005, 2010)).

Usage

IedgeCSstd.tri(
  p1,
  p2,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose CS proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graphs of CS-PCDs.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of CS-PCDs in the standard equilateral triangle, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgeCSbasic.tri, IedgeCStri, and IarcCSstd.tri

Examples

#\donttest{
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C)
n<-3

set.seed(1)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-as.numeric(pcds::runif.std.tri(1)$g)

IedgeCSstd.tri(Xp[1,],Xp[3,],t=1.5,M)
IedgeCSstd.tri(Xp[1,],Xp[3,],t=1.5,M,ugraph="reflexivity")

P1<-c(.4,.2)
P2<-c(.5,.26)
t<-2
IedgeCSstd.tri(P1,P2,t,M)
IedgeCSstd.tri(P1,P2,t,M,ugraph = "reflexivity")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - one triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of CS-PCDs ) for points p1 and p2 in a given triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the CS-PCD underlying graph, that is, returns 1 if p2 is in N_{CS}(p1,t) or p1 is in N_{CS}(p2,t), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the CS-PCD reflexivity graph, that is, returns 1 if p2 is in N_{CS}(p1,t) and p1 is in N_{CS}(p2,t), returns 0 otherwise.

In both cases CS proximity region is constructed with respect to the triangle tri 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 tri; default is M=(1,1,1), i.e., the center of mass of tri.

If p1 and p2 are distinct and either of them are outside tri, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

See also (Ceyhan (2005, 2016)).

Usage

IedgeCStri(
  p1,
  p2,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose CS proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graphs of CS-PCDs.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of CS-PCDs in a given triangle tri, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgeCSbasic.tri, IedgeAStri, IedgePEtri and IarcCStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
M<-as.numeric(pcds::runif.tri(1,Tr)$g)

t<-1.5
n<-3
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

IedgeCStri(Xp[1,],Xp[2,],Tr,t,M)
IedgeCStri(Xp[1,],Xp[2,],Tr,t,M,ugraph = "reflexivity")

P1<-as.numeric(pcds::runif.tri(1,Tr)$g)
P2<-as.numeric(pcds::runif.tri(1,Tr)$g)
IedgeCStri(P1,P2,Tr,t,M)
IedgeCStri(P1,P2,Tr,t,M,ugraph="r")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - standard basic triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of PE-PCDs ) for points p1 and p2 in the standard basic triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the PE-PCD underlying graph, that is, returns 1 if p2 is in N_{PE}(p1,r) **or** p1 is in N_{PE}(p2,r), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the PE-PCD reflexivity graph, that is, returns 1 if p2 is in N_{PE}(p1,r) **and** p1 is in N_{PE}(p2,r), returns 0 otherwise.

In both cases N_{PE}(x,r) is the PE proximity region for point x with expansion parameter r \ge 1. PE proximity region is defined with respect to the standard basic triangle T_b=T((0,0),(1,0),(c_1,c_2)) where c_1 is in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

Vertex 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 standard basic triangle T_b or based on circumcenter of T_b; default is M=(1,1,1) i.e., the center of mass of T_b.

If p1 and p2 are distinct and either of them are outside T_b, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

Any given triangle can be mapped to the standard basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

See also (Ceyhan (2005, 2010)).

Usage

IedgePEbasic.tri(
  p1,
  p2,
  r,
  c1,
  c2,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose PE proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graph of PE-PCDs.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1

c1, c2

Positive real numbers which constitute the vertex of the standard basic triangle adjacent to the shorter edges; c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1.

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 basic triangle or circumcenter of T_b which may be entered as "CC" as well; default is M=(1,1,1) i.e., the center of mass of T_b.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of PE-PCDs in the standard basic triangle, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgePEtri, IedgeASbasic.tri, IedgeCSbasic.tri and IarcPEbasic.tri

Examples

#\donttest{
c1<-.4; c2<-.6
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C);

M<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)

r<-1.5
set.seed(4)

P1<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
P2<-as.numeric(pcds::runif.basic.tri(1,c1,c2)$g)
IedgePEbasic.tri(P1,P2,r,c1,c2,M)
IedgePEbasic.tri(P1,P2,r,c1,c2,M,ugraph = "reflexivity")

P1<-c(.4,.2)
P2<-c(.5,.26)
IedgePEbasic.tri(P1,P2,r,c1,c2,M)
IedgePEbasic.tri(P1,P2,r,c1,c2,M,ugraph = "reflexivity")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - standard equilateral triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of PE-PCDs ) for points p1 and p2 in the standard equilateral triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for points p1 and p2 in the standard equilateral triangle, for the PE-PCD underlying graph, that is, returns 1 if p2 is in N_{PE}(p1,r) **or** p1 is in N_{PE}(p2,r), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for points p1 and p2 in the standard equilateral triangle, for the PE-PCD reflexivity graph, that is, returns 1 if p2 is in N_{PE}(p1,r) **and** p1 is in N_{PE}(p2,r), returns 0 otherwise.

In both cases N_{PE}(x,r) is the PE proximity region for point x with expansion parameter r \ge 1. PE proximity region is defined with respect to the standard equilateral triangle T_e=T(v=1,v=2,v=3)=T((0,0),(1,0),(1/2,\sqrt{3}/2)) and vertex 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.

If p1 and p2 are distinct and either of them are outside T_e, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

See also (Ceyhan (2005, 2010)).

Usage

IedgePEstd.tri(
  p1,
  p2,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose PE proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graph of PE-PCDs.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of PE-PCDs in the standard equilateral triangle, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgePEbasic.tri, IedgePEtri, and IarcPEstd.tri

Examples

#\donttest{
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
Te<-rbind(A,B,C)
n<-3

set.seed(1)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-as.numeric(pcds::runif.std.tri(1)$g)

IedgePEstd.tri(Xp[1,],Xp[3,],r=1.5,M)
IedgePEstd.tri(Xp[1,],Xp[3,],r=1.5,M,ugraph="reflexivity")

P1<-c(.4,.2)
P2<-c(.5,.26)
r<-2
IedgePEstd.tri(P1,P2,r,M)
IedgePEstd.tri(P1,P2,r,M,ugraph = "reflexivity")
#}


The indicator for the presence of an edge from a point to another for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - one triangle case

Description

Returns I(p1p2 is an edge in the underlying or reflexivity graph of PE-PCDs ) for points p1 and p2 in a given triangle.

More specifically, when the argument ugraph="underlying", it returns the edge indicator for the PE-PCD underlying graph, that is, returns 1 if p2 is in N_{PE}(p1,r) or p1 is in N_{PE}(p2,r), returns 0 otherwise. On the other hand, when ugraph="reflexivity", it returns the edge indicator for the PE-PCD reflexivity graph, that is, returns 1 if p2 is in N_{PE}(p1,r) and p1 is in N_{PE}(p2,r), returns 0 otherwise.

In both cases PE proximity region is constructed with respect to the triangle tri and vertex 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 tri or based on the circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri.

If p1 and p2 are distinct and either of them are outside tri, it returns 0, but if they are identical, then it returns 1 regardless of their locations (i.e., it allows loops).

See also (Ceyhan (2005, 2016)).

Usage

IedgePEtri(
  p1,
  p2,
  tri,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

p1

A 2D point whose PE proximity region is constructed.

p2

A 2D point. The function determines whether there is an edge from p1 to p2 or not in the underlying or reflexivity graph of PE-PCDs.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Returns 1 if there is an edge between points p1 and p2 in the underlying or reflexivity graph of PE-PCDs in a given triangle tri, and 0 otherwise.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

IedgePEbasic.tri, IedgeAStri, IedgeCStri and IarcPEtri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
M<-as.numeric(pcds::runif.tri(1,Tr)$g)

r<-1.5
n<-3
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

IedgePEtri(Xp[1,],Xp[2,],Tr,r,M)
IedgePEtri(Xp[1,],Xp[2,],Tr,r,M,ugraph = "reflexivity")

P1<-as.numeric(pcds::runif.tri(1,Tr)$g)
P2<-as.numeric(pcds::runif.tri(1,Tr)$g)
IedgePEtri(P1,P2,Tr,r,M)
IedgePEtri(P1,P2,Tr,r,M,ugraph="r")
#}


A test of segregation/association based on edge density of underlying or reflexivity graph of Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data

Description

An object of class "htest" (i.e., hypothesis test) function which performs a hypothesis test of complete spatial randomness (CSR) or uniformity of Xp points in the convex hull of Yp points against the alternatives of segregation (where Xp points cluster away from Yp points) and association (where Xp points cluster around Yp points) based on the normal approximation of the edge density of the underlying or reflexivity graph of PE-PCD for uniform 2D data.

The function yields the test statistic, p-value for the corresponding alternative, the confidence interval, estimate and null value for the parameter of interest (which is the edge density), and method and name of the data set used.

Under the null hypothesis of uniformity of Xp points in the convex hull of Yp points, edge density of underlying or reflexivity graph of PE-PCD whose vertices are Xp points equals to its expected value under the uniform distribution and alternative could be two-sided, or left-sided (i.e., data is accumulated around the Yp points, or association) or right-sided (i.e., data is accumulated around the centers of the triangles, or segregation).

PE proximity region is constructed with the expansion parameter r \ge 1 and CM-vertex regions (i.e., the test is not available for a general center M at this version of the function).

**Caveat:** This test is currently a conditional test, where Xp points are assumed to be random, while Yp points are assumed to be fixed (i.e., the test is conditional on Yp points). Furthermore, the test is a large sample test when Xp points are substantially larger than Yp points, say at least 5 times more. This test is more appropriate when supports of Xp and Yp have a substantial overlap. Currently, the Xp points outside the convex hull of Yp points are handled with a correction factor which is derived under the assumption of uniformity of Xp and Yp points in the study window, (see the description below for the argument ch.cor and the function code.) However, in the special case of no Xp points in the convex hull of Yp points, edge density is taken to be 1, as this is clearly a case of segregation. Removing the conditioning and extending it to the case of non-concurring supports are topics of ongoing research of the author of the package.

ch.cor is for convex hull correction (default is "no convex hull correction", i.e., ch.cor=FALSE) which is recommended when both Xp and Yp have the same rectangular support.

See also (Ceyhan (2005, 2016)) for more on the test based on the edge density of underlying or reflexivity graph of PE-PCDs.

Usage

PEedge.dens.test(
  Xp,
  Yp,
  r,
  ugraph = c("underlying", "reflexivity"),
  ch.cor = FALSE,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

ch.cor

A logical argument for convex hull correction, default ch.cor=FALSE, recommended when both Xp and Yp have the same rectangular support.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater".

conf.level

Level of the confidence interval, default is 0.95, for the edge density of underlying or reflexivity graph of PE-PCD based on the 2D data set Xp.

Value

A list with the elements

statistic

Test statistic

p.value

The p-value for the hypothesis test for the corresponding alternative

conf.int

Confidence interval for the edge density at the given confidence level conf.level and depends on the type of alternative.

estimate

Estimate of the parameter, i.e., edge density

null.value

Hypothesized value for the parameter, i.e., the null edge density, which is usually the mean edge density under uniform distribution.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater"

method

Description of the hypothesis test

data.name

Name of the data set

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

CSedge.dens.test and PEarc.dens.test

Examples


#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-100; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")

PEedge.dens.test(Xp,Yp,r=1.25)
PEedge.dens.test(Xp,Yp,r=1.25,ch=TRUE)

PEedge.dens.test(Xp,Yp,r=1.25,ugraph="r")
PEedge.dens.test(Xp,Yp,r=1.25,ugraph="r",ch=TRUE)
#since Y points are not uniform, convex hull correction is invalid here



Edge density of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - one triangle case

Description

Returns the edge density of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) whose vertex set is the given 2D numerical data set, Xp, (some of its members are) in the triangle tri.

PE proximity regions is defined with respect to tri with expansion parameter r \ge 1 and vertex regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri or based on circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri. The function also provides edge density standardized by the mean and asymptotic variance of the edge density of the underlying or reflexivity graph of PE-PCD for uniform data in the triangle tri only when M is the center of mass. For the number of edges, loops are not allowed.

in.tri.only is a logical argument (default is FALSE) for considering only the points inside the triangle or all the points as the vertices of the digraph. if in.tri.only=TRUE, edge density is computed only for the points inside the triangle (i.e., edge density of the subgraph of the underlying or reflexivity graph induced by the vertices in the triangle is computed), otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

See also (Ceyhan (2005, 2016)).

Usage

PEedge.dens.tri(
  Xp,
  tri,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  in.tri.only = FALSE
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

in.tri.only

A logical argument (default is in.tri.only=FALSE) for computing the edge density for only the points inside the triangle, tri. That is, if in.tri.only=TRUE edge density of the induced subgraph with the vertices inside tri is computed, otherwise otherwise edge density of the entire graph (i.e., graph with all the vertices) is computed.

Value

A list with the elements

edge.dens

Edge density of the underlying or reflexivity graphs of the PE-PCD whose vertices are the 2D numerical data set, Xp; PE proximity regions are defined with respect to the triangle tri and M-vertex regions

std.edge.dens

Edge density standardized by the mean and asymptotic variance of the edge density of the underlying or reflexivity graph of the PE-PCD for uniform data in the triangle tri. This will only be returned, if M is the center of mass.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

ASedge.dens.tri, CSedge.dens.tri, and PEarc.dens.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

#For the underlying graph
num.edgesPEtri(Xp,Tr,r=1.5,M)$num.edges
PEedge.dens.tri(Xp,Tr,r=1.5,M)
PEedge.dens.tri(Xp,Tr,r=1.5,M,in.tri.only = TRUE)

#For the reflexivity graph
num.edgesPEtri(Xp,Tr,r=1.5,M,ugraph="r")$num.edges
PEedge.dens.tri(Xp,Tr,r=1.5,M,ugraph="r")
PEedge.dens.tri(Xp,Tr,r=1.5,M,in.tri.only = TRUE,ugraph="r")
#}


The edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) for 2D data - multiple triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of AS-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

AS proximity regions are defined with respect to the Delaunay triangles based on Yp points, i.e., AS proximity regions are defined only for Xp points inside the convex hull of Yp points. That is, edges may exist for points only inside the convex hull of Yp points. It also provides various descriptions and quantities about the edges of the AS-PCD such as number of edges, edge density, etc.

Vertex regions are based on the center M="CC" for circumcenter of each Delaunay triangle or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle; default is M="CC", i.e., circumcenter of each triangle. M must be entered in barycentric coordinates unless it is the circumcenter. The different consideration of circumcenter vs any other interior center of the triangle is because the projections from circumcenter are orthogonal to the edges, while projections of M on the edges are on the extensions of the lines connecting M and the vertices. Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the AS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

M

The center of the triangle. "CC" represents the circumcenter of each Delaunay triangle or 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle; default is M="CC", i.e., the circumcenter of each triangle. M must be entered in barycentric coordinates unless it is the circumcenter.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, here, it is only the center M used to construct the vertex regions.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the Delaunay triangulation based on Yp points.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the digraph, Xp points

vert.name

Name of the data set which constitute the vertices of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of AS-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

edgesAStri, edgesPE, edgesCS, and arcsAS

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)

Edges<-edgesAS(Xp,Yp,M)
Edges
summary(Edges)
plot(Edges)
#}


The edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) for 2D data - one triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of AS-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

AS proximity regions are constructed with respect to the triangle tri, i.e., edges may exist only for points inside tri. It also provides various descriptions and quantities about the edges of the underlying or reflexivity graph of the AS-PCD such as number of edges, edge density, etc.

Vertex 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 or based on circumcenter of tri; default is M="CC", i.e., circumcenter of tri. The different consideration of circumcenter vs any other interior center of the triangle is because the projections from circumcenter are orthogonal to the edges, while projections of M on the edges are on the extensions of the lines connecting M and the vertices.

See also (Ceyhan (2005, 2016)).

Usage

edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

M

The center of the triangle. "CC" stands for circumcenter of the triangle tri or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the triangle T_b; default is M="CC", i.e., the circumcenter of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, here, it is only the center M used to construct the vertex regions.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the underlying or reflexivity graph of the digraph, Xp points

vert.name

Name of the data set which constitutes the vertices of the underlying or reflexivity graph of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of AS-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

edgesAS, edgesPEtri, edgesCStri, and arcsAStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

#for underlying graph
Edges<-edgesAStri(Xp,Tr,M)
Edges
summary(Edges)
plot(Edges)

#for reflexivity graph
Edges<-edgesAStri(Xp,Tr,M,ugraph="r")
Edges
summary(Edges)
plot(Edges)

#can add vertex regions, but we first need to determine center is the circumcenter or not,
#see the description for more detail.
CC<-pcds::circumcenter.tri(Tr)
if (isTRUE(all.equal(M,CC)))
{cent<-CC
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)
cent.name<-"CC"
} else
{cent<-M
cent.name<-"M"
Ds<-pcds::prj.cent2edges(Tr,M)
}
L<-rbind(cent,cent,cent); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)

#now we can add the vertex names and annotation
txt<-rbind(Tr,cent,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.03,-.03,-.01)
yc<-txt[,2]+c(.02,.02,.03,.06,.04,.05,-.07)
txt.str<-c("A","B","C","M","D1","D2","D3")
text(xc,yc,txt.str)
#}


The edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data - multiple triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of CS-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

CS proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter t > 0 and edge regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle). Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the CS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

t

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

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle, default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, the center M used to construct the edge regions and the expansion parameter t.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is Delaunay triangulation based on Yp points.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the underlying and reflexivity graph of the digraph, Xp points

vert.name

Name of the data set which constitute the vertices of the underlying or reflexivity graph of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of CS-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

edgesCStri, edgesAS, edgesPE, and arcsCS

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)
t<-1.5

Edges<-edgesCS(Xp,Yp,t,M)
Edges
summary(Edges)
plot(Edges)

Edges<-edgesCS(Xp,Yp,t,M,ugraph="r")
Edges
summary(Edges)
plot(Edges)
#}


The edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data - one triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of CS-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

CS proximity regions are constructed with respect to the triangle tri with expansion parameter t > 0, i.e., edges may exist only for points inside tri. It also provides various descriptions and quantities about the edges of the underlying or reflexivity graphs of the CS-PCD such as number of edges, edge density, etc.

Edge regions are based on 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. With any interior center M, the edge regions are constructed using the extensions of the lines combining vertices with M.

See also (Ceyhan (2005, 2016)).

Usage

edgesCStri(Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, the center M used to construct the edge regions and the expansion parameter t.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the underlying or reflexivity graph of the digraph, Xp points

vert.name

Name of the data set which constitutes the vertices of the underlying or reflexivity graph of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of CS-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

edgesCS, edgesAStri, edgesPEtri, and arcsCStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

t<-1.5

#for underlying graph
Edges<-edgesCStri(Xp,Tr,t,M)
Edges
summary(Edges)
plot(Edges)

#for reflexivity graph
Edges<-edgesCStri(Xp,Tr,t,M,ugraph="r")
Edges
summary(Edges)
plot(Edges)

#can add edge regions
cent<-M
cent.name<-"M"
Ds<-pcds::prj.cent2edges(Tr,M)
L<-rbind(cent,cent,cent); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)

#now we can add the vertex names and annotation
txt<-rbind(Tr,cent,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.03,-.03,-.01)
yc<-txt[,2]+c(.02,.02,.03,.06,.04,.05,-.07)
txt.str<-c("A","B","C","M","D1","D2","D3")
text(xc,yc,txt.str)
#}


The edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data - multiple triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of PE-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

PE proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter r \ge 1 and vertex regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle or based on circumcenter of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle). The different consideration of circumcenter vs any other interior center of the triangle is because the projections from circumcenter are orthogonal to the edges, while projections of M on the edges are on the extensions of the lines connecting M and the vertices. Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the PE-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle or circumcenter of each Delaunay triangle (for this, argument should be set as M="CC"), default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, the center M used to construct the vertex regions and the expansion parameter r.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is Delaunay triangulation based on Yp points.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the underlying or reflexivity graph of the digraph, Xp points

vert.name

Name of the data set which constitute the vertices of the underlying or reflexivity graph of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of PE-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

edgesPEtri, edgesAS, edgesCS, and arcsPE

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)
r<-1.5

Edges<-edgesPE(Xp,Yp,r,M)
Edges
summary(Edges)
plot(Edges)
#}


The edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data - one triangle case

Description

An object of class "UndPCDs". Returns edges of the underlying or reflexivity graph of PE-PCD as left and right end points and related parameters and the quantities of these graphs. The vertices of these graphs are the data points in Xp in the multiple triangle case.

PE proximity regions are constructed with respect to the triangle tri with expansion parameter r \ge 1, i.e., edges may exist only for points inside tri. It also provides various descriptions and quantities about the edges of the underlying or reflexivity graph of the PE-PCD such as number of edges, edge density, etc.

Vertex regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri or based on the circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri. When the center is the circumcenter, CC, the vertex regions are constructed based on the orthogonal projections to the edges, while with any interior center M, the vertex regions are constructed using the extensions of the lines combining vertices with M. The different consideration of circumcenter vs any other interior center of the triangle is because the projections from circumcenter are orthogonal to the edges, while projections of M on the edges are on the extensions of the lines connecting M and the vertices. M-vertex regions are recommended spatial inference, due to geometry invariance property of the edge density and domination number the PE-PCDs based on uniform data.

See also (Ceyhan (2005, 2016)).

Usage

edgesPEtri(Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

type

A description of the underlying or reflexivity graph of the digraph

parameters

Parameters of the underlying or reflexivity graph of the digraph, the center M used to construct the vertex regions and the expansion parameter r.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

tess.name

Name of the tessellation points tess.points

vertices

Vertices of the underlying or reflexivity graph of the digraph, Xp points

vert.name

Name of the data set which constitutes the vertices of the underlying or reflexivity graph of the digraph

LE, RE

Left and right end points of the edges of the underlying or reflexivity graph of PE-PCD for 2D data set Xp as vertices of the underlying or reflexivity graph of the digraph

mtitle

Text for "main" title in the plot of the underlying or reflexivity graph of the digraph

quant

Various quantities for the underlying or reflexivity graph of the digraph: number of vertices, number of partition points, number of intervals, number of edges, and edge density.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

edgesPE, edgesAStri, edgesCStri, and arcsPEtri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

r<-1.5

#for underlying graph
Edges<-edgesPEtri(Xp,Tr,r,M)
Edges
summary(Edges)
plot(Edges)

#for reflexivity graph
Edges<-edgesPEtri(Xp,Tr,r,M,ugraph="r")
Edges
summary(Edges)
plot(Edges)

#can add vertex regions
#but we first need to determine center is the circumcenter or not,
#see the description for more detail.
CC<-pcds::circumcenter.tri(Tr)
if (isTRUE(all.equal(M,CC)))
{cent<-CC
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)
cent.name<-"CC"
} else
{cent<-M
cent.name<-"M"
Ds<-pcds::prj.cent2edges(Tr,M)
}
L<-rbind(cent,cent,cent); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)

#now we can add the vertex names and annotation
txt<-rbind(Tr,cent,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.03,-.03,-.01)
yc<-txt[,2]+c(.02,.02,.03,.06,.04,.05,-.07)
txt.str<-c("A","B","C","M","D1","D2","D3")
text(xc,yc,txt.str)
#}


Returns the mean and (asymptotic) variance of edge density of underlying or reflexivity graphs of Central Similarity Proximity Catch Digraph (CS-PCD) for 2D uniform data in one triangle

Description

The mean and (asymptotic) variance functions for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs): muOrCS2D and asy.varOrCS2D for the underlying graph and muAndCS2D and asy.varAndCS2D for the reflexivity graph.

muOrCS2D and muAndCS2D return the mean of the (edge) density of the underlying or reflexivity graphs of CS-PCDs, respectively, for 2D uniform data in a triangle. Similarly, asy.varOrCS2D and asy.varAndCS2D return the asymptotic variance of the edge density of the underlying or reflexivity graphs of CS-PCDs, respectively, for 2D uniform data in a triangle.

CS proximity regions are defined with expansion parameter t > 0 with respect to the triangle in which the points reside and edge regions are based on center of mass, CM of the triangle.

See also (Ceyhan (2016)).

Usage

muOrCS2D(t)

muAndCS2D(t)

mu.undCS2D(t, ugraph = c("underlying", "reflexivity"))

asy.varOrCS2D(t)

asy.varAndCS2D(t)

asy.var.undCS2D(t, ugraph = c("underlying", "reflexivity"))

Arguments

t

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

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

mu.undCS2D returns the mean and asy.varUndOrCS2D returns the (asymptotic) variance of the edge density of the underlying graph of the CS-PCD for uniform data in any triangle if ugraph="underlying", and those of the reflexivity graph if ugraph="reflexivity". The functions muOrCS2D, muAndCS2D, asy.varOrCS2D, and asy.varAndCS2D are the corresponding mean and asymptotic variance functions for the edge density of the reflexivity graph of the CS-PCD, respectively, for uniform data in any triangle.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

mu.undCS2D, asy.var.undCS2D muCS2D, and asy.varCS2D,

Examples

#\donttest{
mu.undCS2D(1.2)
mu.undCS2D(1.2,ugraph="r")

tseq<-seq(0.01,10,by=.05)
ltseq<-length(tseq)

muOR = muAND <- vector()
for (i in 1:ltseq)
{
  muOR<-c(muOR,mu.undCS2D(tseq[i]))
  muAND<-c(muAND,mu.undCS2D(tseq[i],ugraph="r"))
}

plot(tseq, muOR,type="l",xlab="t",ylab=expression(mu(t)),lty=1,
     xlim=range(tseq),ylim=c(0,1))
lines(tseq,muAND,type="l",lty=2,col=2)
legend("bottomright", inset=.02,
       legend=c(expression(mu[or](t)),expression(mu[and](t))),
       lty=1:2,col=1:2)
#}

#\donttest{
asy.var.undCS2D(1.2)
asy.var.undCS2D(1.2,ugraph="r")

asy.varOrCS2D(.2)

tseq<-seq(.05,25,by=.05)
ltseq<-length(tseq)

avarOR<-avarAND<-vector()
for (i in 1:ltseq)
{
  avarOR<-c(avarOR,asy.var.undCS2D(tseq[i]))
  avarAND<-c(avarAND,asy.var.undCS2D(tseq[i],ugraph="r"))
}

oldpar <- par(mar=c(5,5,4,2))
plot(tseq, 4*avarAND,type="l",lty=2,col=2,xlab="t",
     ylab=expression(paste(sigma^2,"(t)")),xlim=range(tseq))
lines(tseq,4*avarOR,type="l")
legend(18,.1,
       legend=c(expression(paste(sigma["underlying"]^"2","(t)")),
                 expression(paste(sigma["reflexivity"]^"2","(t)")) ),
       lty=1:2,col=1:2)

par(oldpar)
#}


Returns the mean and (asymptotic) variance of edge density of underlying or reflexivity graph of Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D uniform data in one triangle

Description

The mean and (asymptotic) variance functions for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs): muOrPE2D and asy.varOrPE2D for the underlying graph and muAndPE2D and asy.varAndPE2D for the reflexivity graph.

muOrPE2D and muAndPE2D return the mean of the (edge) density of the underlying or reflexivity graph of PE-PCDs, respectively, for 2D uniform data in a triangle. Similarly, asy.varOrPE2D and asy.varAndPE2D return the asymptotic variance of the edge density of the underlying or reflexivity graph of PE-PCDs, respectively, for 2D uniform data in a triangle.

PE proximity regions are defined with expansion parameter r \ge 1 with respect to the triangle in which the points reside and vertex regions are based on center of mass, CM of the triangle.

See also (Ceyhan (2016)).

Usage

muOrPE2D(r)

muAndPE2D(r)

mu.undPE2D(r, ugraph = c("underlying", "reflexivity"))

asy.varOrPE2D(r)

asy.varAndPE2D(r)

asy.var.undPE2D(r, ugraph = c("underlying", "reflexivity"))

Arguments

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

mu.undPE2D returns the mean and asy.varUndOrPE2D returns the (asymptotic) variance of the edge density of the underlying graph of the PE-PCD for uniform data in any triangle if ugraph="underlying", and those of the reflexivity graph if ugraph="reflexivity". The functions muOrPE2D, muAndPE2D, asy.varOrPE2D, and asy.varAndPE2D are the corresponding mean and asymptotic variance functions for the edge density of the reflexivity graph of the PE-PCD, respectively, for uniform data in any triangle.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

mu.undCS2D, asy.var.undCS2D, muPE2D, asy.varPE2D, muAndCS2D, and asy.varAndCS2D

Examples

#\donttest{
mu.undPE2D(1.2)
mu.undPE2D(1.2,ugraph="r")

rseq<-seq(1.01,5,by=.05)
lrseq<-length(rseq)

muOR = muAND <- vector()
for (i in 1:lrseq)
{
  muOR<-c(muOR,mu.undPE2D(rseq[i]))
  muAND<-c(muAND,mu.undPE2D(rseq[i],ugraph="r"))
}

plot(rseq, muOR,type="l",xlab="r",ylab=expression(mu(r)),lty=1,
     xlim=range(rseq),ylim=c(0,1))
lines(rseq,muAND,type="l",lty=2,col=2)
legend("bottomright", inset=.02,
       legend=c(expression(mu[or](r)),expression(mu[and](r))),
       lty=1:2,col=1:2)
#}

#\donttest{
asy.var.undPE2D(1.2)
asy.var.undPE2D(1.2,ugraph="r")

rseq<-seq(1.01,5,by=.05)
lrseq<-length(rseq)

avarOR<-avarAND<-vector()
for (i in 1:lrseq)
{
  avarOR<-c(avarOR,asy.var.undPE2D(rseq[i]))
  avarAND<-c(avarAND,asy.var.undPE2D(rseq[i],ugraph="r"))
}

oldpar <- par(mar=c(5,5,4,2))
plot(rseq, avarAND,type="l",lty=2,col=2,xlab="r",
     ylab=expression(paste(sigma^2,"(r)")),xlim=range(rseq))
lines(rseq,avarOR,type="l")
legend(3.75,.02,
       legend=c(expression(paste(sigma["underlying"]^"2","(r)")),
                 expression(paste(sigma["reflexivity"]^"2","(r)")) ),
       lty=1:2,col=1:2)

par(oldpar)
#}


Incidence matrix for the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - multiple triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graph of the AS-PCD whose vertices are the data points in Xp in the multiple triangle case.

AS proximity regions are defined with respect to the Delaunay triangles based on Yp points and vertex regions are based on the center M="CC" for circumcenter of each Delaunay triangle or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle; default is M="CC", i.e., circumcenter of each triangle. Loops are allowed, so the diagonal entries are all equal to 1.

Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the incidence matrix loops are allowed, so the diagonal entries are all equal to 1.

See (Ceyhan (2005, 2016)) for more on the AS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

inci.mat.undAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

M

The center of each triangle. "CC" stands for circumcenter of each Delaunay triangle or 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle; default is M="CC", i.e., the circumcenter of each triangle.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graph of the AS-PCD whose vertices are the 2D data set, Xp. AS proximity regions are constructed with respect to the Delaunay triangles and M-vertex regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

inci.mat.undAStri, inci.mat.undPE, inci.mat.undCS, and inci.matAS

Examples

#\donttest{
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)

IM<-inci.mat.undAS(Xp,Yp,M)
IM
pcds::dom.num.greedy(IM)
#}


Incidence matrix for the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graph of the AS-PCD whose vertices are the given 2D numerical data set, Xp, in the triangle tri=T(v=1,v=2,v=3).

AS proximity regions are defined with respect to the triangle tri=T(v=1,v=2,v=3) and vertex 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 or based on circumcenter of tri; default is M="CC", i.e., circumcenter of tri. Loops are allowed, so the diagonal entries are all equal to 1.

See also (Ceyhan (2005, 2016)).

Usage

inci.mat.undAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

M

The center of the triangle. "CC" stands for circumcenter of the triangle tri or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of tri; default is M="CC", i.e., the circumcenter of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graph of the AS-PCD whose vertices are the 2D data set, Xp in the triangle tri with vertex regions based on the center M

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

inci.mat.undAS, inci.mat.undPEtri, inci.mat.undCStri, and inci.matAStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
(IM<-inci.mat.undAStri(Xp,Tr,M))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)

(IM<-inci.mat.undAStri(Xp,Tr,M,ugraph="r"))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)
#}


Incidence matrix for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - multiple triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graphs of the CS-PCD whose vertices are the data points in Xp in the multiple triangle case.

CS proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter t > 0 and edge regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle).

Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the incidence matrix loops are allowed, so the diagonal entries are all equal to 1.

See (Ceyhan (2005, 2016)) for more on the CS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

inci.mat.undCS(
  Xp,
  Yp,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

t

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

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle, default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graphs of the CS-PCD whose vertices are the 2D data set, Xp. CS proximity regions are constructed with respect to the Delaunay triangles and M-edge regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

inci.mat.undCStri, inci.mat.undAS, inci.mat.undPE, and inci.matCS

Examples

#\donttest{
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)
t<-1.5

IM<-inci.mat.undCS(Xp,Yp,t,M)
IM
pcds::dom.num.greedy(IM)
#}


Incidence matrix for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graphs of the CS-PCD whose vertices are the given 2D numerical data set, Xp, in the standard equilateral triangle T_e=T(v=1,v=2,v=3)=T((0,0),(1,0),(1/2,\sqrt{3}/2)).

CS proximity region is constructed with respect to the standard equilateral triangle T_e 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. Loops are allowed, so the diagonal entries are all equal to 1.

See also (Ceyhan (2005, 2010)).

Usage

inci.mat.undCSstd.tri(
  Xp,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graphs of the CS-PCD with vertices being 2D data set, Xp in the standard equilateral triangle where CS proximity regions are defined with M-edge regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

inci.mat.undCStri, inci.mat.undCS, and inci.matCSstd.tri

Examples

#\donttest{
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)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-as.numeric(pcds::runif.std.tri(1)$g)

inc.mat<-inci.mat.undCSstd.tri(Xp,t=1.5,M)
inc.mat
(sum(inc.mat)-n)/2
num.edgesCSstd.tri(Xp,t=1.5,M)$num.edges

pcds::dom.num.greedy(inc.mat)
pcds::Idom.num.up.bnd(inc.mat,2)
#}


Incidence matrix for the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - one triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graphs of the CS-PCD whose vertices are the given 2D numerical data set, Xp, in the triangle tri=T(v=1,v=2,v=3).

CS proximity regions are constructed with respect to triangle tri 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 the triangle tri; default is M=(1,1,1), i.e., the center of mass of tri. Loops are allowed, so the diagonal entries are all equal to 1.

See also (Ceyhan (2005, 2016)).

Usage

inci.mat.undCStri(
  Xp,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graphs of the CS-PCD with vertices being 2D data set, Xp in the triangle tri with edge regions based on center M

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

inci.mat.undCS, inci.mat.undAStri, inci.mat.undPEtri, and inci.matCStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
(IM<-inci.mat.undCStri(Xp,Tr,t=1.5,M))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)

(IM<-inci.mat.undCStri(Xp,Tr,t=1.5,M,ugraph="r"))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)
#}


Incidence matrix for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - multiple triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graph of the PE-PCD whose vertices are the data points in Xp in the multiple triangle case.

PE proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter r \ge 1 and vertex regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle or based on circumcenter of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle).

Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the incidence matrix loops are allowed, so the diagonal entries are all equal to 1.

See (Ceyhan (2005, 2016)) for more on the PE-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

inci.mat.undPE(
  Xp,
  Yp,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle or circumcenter of each Delaunay triangle (for this, argument should be set as M="CC"), default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graph of the PE-PCD whose vertices are the 2D data set, Xp. PE proximity regions are constructed with respect to the Delaunay triangles and M-vertex regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

inci.mat.undPEtri, inci.mat.undAS, inci.mat.undCS, and inci.matPE

Examples

#\donttest{
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)
r<-1.5

IM<-inci.mat.undPE(Xp,Yp,r,M)
IM
pcds::dom.num.greedy(IM)
#}


Incidence matrix for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - standard equilateral triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graph of the PE-PCD whose vertices are the given 2D numerical data set, Xp, in the standard equilateral triangle T_e=T(v=1,v=2,v=3)=T((0,0),(1,0),(1/2,\sqrt{3}/2)).

PE proximity region is constructed with respect to the standard equilateral triangle T_e with expansion parameter r \ge 1 and vertex 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. Loops are allowed, so the diagonal entries are all equal to 1.

See also (Ceyhan (2005, 2010)).

Usage

inci.mat.undPEstd.tri(
  Xp,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graph of the PE-PCD with vertices being 2D data set, Xp in the standard equilateral triangle where PE proximity regions are defined with M-vertex regions.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

inci.mat.undPEtri, inci.mat.undPE, and inci.matPEstd.tri

Examples

#\donttest{
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)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-as.numeric(pcds::runif.std.tri(1)$g)

inc.mat<-inci.mat.undPEstd.tri(Xp,r=1.25,M)
inc.mat
(sum(inc.mat)-n)/2
num.edgesPEstd.tri(Xp,r=1.25,M)$num.edges

pcds::dom.num.greedy(inc.mat)
pcds::Idom.num.up.bnd(inc.mat,2)
#}


Incidence matrix for the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - one triangle case

Description

Returns the incidence matrix for the underlying or reflexivity graph of the PE-PCD whose vertices are the given 2D numerical data set, Xp, in the triangle tri=T(v=1,v=2,v=3).

PE proximity regions are constructed with respect to triangle tri with expansion parameter r \ge 1 and vertex 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. Loops are allowed, so the diagonal entries are all equal to 1.

See also (Ceyhan (2005, 2016)).

Usage

inci.mat.undPEtri(
  Xp,
  tri,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

Incidence matrix for the underlying or reflexivity graph of the PE-PCD with vertices being 2D data set, Xp in the triangle tri with vertex regions based on center M

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

inci.mat.undPE, inci.mat.undAStri, inci.mat.undCStri, and inci.matPEtri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
(IM<-inci.mat.undPEtri(Xp,Tr,r=1.25,M))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)

(IM<-inci.mat.undPEtri(Xp,Tr,r=1.25,M,ugraph="r"))
pcds::dom.num.greedy(IM)
pcds::Idom.num.up.bnd(IM,3)
#}


Number of edges of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - multiple triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraph (AS-PCD) and various other quantities and vectors such as the vector of number of vertices (i.e., number of data points) in the Delaunay triangles, number of data points in the convex hull of Yp points, indices of the Delaunay triangles for the data points, etc.

AS proximity regions are defined with respect to the Delaunay triangles based on Yp points and vertex regions in each triangle are based on the center M="CC" for circumcenter of each Delaunay triangle or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle; default is M="CC", i.e., circumcenter of each triangle. Each Delaunay triangle is first converted to a (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on AS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

num.edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

M

The center of the triangle. "CC" stands for circumcenter of each Delaunay triangle or 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle; default is M="CC", i.e., the circumcenter of each triangle.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and related quantities for the induced subgraphs of the underlying or reflexivity graphs (of AS-PCD) in the Delaunay triangles

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the AS-PCD

num.edges

Total number of edges in all triangles, i.e., the number of edges for the entire underlying or reflexivity graphs of the AS-PCD

num.in.conv.hull

Number of Xp points in the convex hull of Yp points

num.in.tris

The vector of number of Xp points in the Delaunay triangles based on Yp points

weight.vec

The vector of the areas of Delaunay triangles based on Yp points

tri.num.edges

The vector of the number of edges of the components of the AS-PCD in the Delaunay triangles based on Yp points

del.tri.ind

A matrix of indices of vertices of the Delaunay triangles based on Yp points, each column corresponds to the vector of indices of the vertices of one triangle.

data.tri.ind

A vector of indices of vertices of the Delaunay triangles in which data points reside, i.e., column number of del.tri.ind for each Xp point.

tess.points

Points on which the tessellation of the study region is performed, here, tessellation is the Delaunay triangulation based on Yp points.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

num.edgesAStri, num.edgesPE, num.edgesCS, and num.arcsAS

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-15; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")

M<-c(1,1,1)

Nedges = num.edgesAS(Xp,Yp,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Arc Slice Proximity Catch Digraphs (AS-PCDs) whose vertices are the given 2D numerical data set, Xp in a given triangle tri. It also provides number of vertices (i.e., number of data points inside the triangle) and indices of the data points that reside in the triangle.

AS proximity regions are defined with respect to the triangle tri and vertex 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 or based on circumcenter of tri; default is M="CC", i.e., circumcenter of tri. For the number of edges, loops are not allowed, so edges are only possible for points inside the triangle, tri.

See also (Ceyhan (2005, 2016)).

Usage

num.edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD.

tri

A 3 \times 2 matrix with 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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and quantities related to the triangle

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the AS-PCD

num.edges

Number of edges of the underlying or reflexivity graphs of the AS-PCD with vertices in the given triangle tri

num.in.tri

Number of Xp points in the triangle, tri

ind.in.tri

The vector of indices of the Xp points that reside in the triangle

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

num.edgesAS, num.edgesPEtri, num.edgesCStri, and num.arcsAStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);

n<-10
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

Nedges = num.edgesAStri(Xp,Tr,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges of the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - multiple triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Central Similarity Proximity Catch Digraph (CS-PCD) and various other quantities and vectors such as the vector of number of vertices (i.e., number of data points) in the Delaunay triangles, number of data points in the convex hull of Yp points, indices of the Delaunay triangles for the data points, etc.

CS proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter t > 0 and edge regions in each triangle is based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle). Each Delaunay triangle is first converted to an (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on CS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

num.edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

t

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

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle, default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and related quantities for the induced subgraphs of the underlying or reflexivity graphs (of CS-PCD) in the Delaunay triangles

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the CS-PCD

num.edges

Total number of edges in all triangles, i.e., the number of edges for the entire underlying or reflexivity graphs of the CS-PCD

num.in.conv.hull

Number of Xp points in the convex hull of Yp points

num.in.tris

The vector of number of Xp points in the Delaunay triangles based on Yp points

weight.vec

The vector of the areas of Delaunay triangles based on Yp points

tri.num.edges

The vector of the number of edges of the components of the CS-PCD in the Delaunay triangles based on Yp points

del.tri.ind

A matrix of indices of vertices of the Delaunay triangles based on Yp points, each column corresponds to the vector of indices of the vertices of one triangle.

data.tri.ind

A vector of indices of vertices of the Delaunay triangles in which data points reside, i.e., column number of del.tri.ind for each Xp point.

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the Delaunay triangulation based on Yp points.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

num.edgesCStri, num.edgesAS, num.edgesPE, and num.arcsCS

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-15; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")

M<-c(1,1,1)

Nedges = num.edgesCS(Xp,Yp,t=1.5,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges in the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - standard equilateral triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) whose vertices are the given 2D numerical data set, Xp in the standard equilateral triangle. It also provides number of vertices (i.e., number of data points inside the triangle) and indices of the data points that reside in the triangle.

CS proximity region N_{CS}(x,t) is defined with respect to the standard equilateral triangle T_e=T(v=1,v=2,v=3)=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. For the number of edges, loops are not allowed so edges are only possible for points inside T_e for this function.

See also (Ceyhan (2016)).

Usage

num.edgesCSstd.tri(
  Xp,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs based on the CS-PCD.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and quantities related to the standard equilateral triangle

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the CS-PCD

num.edges

Number of edges of the underlying or reflexivity graphs based on the CS-PCD with vertices in the standard equilateral triangle T_e

num.in.tri

Number of Xp points in the standard equilateral triangle, T_e

ind.in.tri

The vector of indices of the Xp points that reside in T_e

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle T_e.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

num.edgesCStri, num.edgesCS, and num.arcsCSstd.tri

Examples

#\donttest{
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
n<-10

set.seed(1)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-c(.6,.2)

Nedges = num.edgesCSstd.tri(Xp,t=1.5,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges in the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) - one triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graphs of Central Similarity Proximity Catch Digraphs (CS-PCDs) whose vertices are the given 2D numerical data set, Xp in a given triangle. It also provides number of vertices (i.e., number of data points inside the triangle) and indices of the data points that reside in the triangle.

CS proximity region N_{CS}(x,t) is defined with respect to the triangle, tri 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 the triangle tri; default is M=(1,1,1), i.e., the center of mass of tri. For the number of edges, loops are not allowed, so edges are only possible for points inside the triangle tri for this function.

See also (Ceyhan (2005); Ceyhan et al. (2007)).

Usage

num.edgesCStri(
  Xp,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

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

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and quantities related to the triangle

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the CS-PCD

num.edges

Number of edges of the underlying or reflexivity graphs based on the CS-PCD with vertices in the given triangle tri

num.in.tri

Number of Xp points in the triangle, tri

ind.in.tri

The vector of indices of the Xp points that reside in the triangle

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E, Priebe CE, Marchette DJ (2007). “A new family of random graphs for testing spatial segregation.” Canadian Journal of Statistics, 35(1), 27-50.

See Also

num.edgesCS, num.edgesAStri, num.edgesPEtri, and num.arcsCStri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);

n<-10
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

Nedges = num.edgesCStri(Xp,Tr,t=1.5,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - multiple triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraph (PE-PCD) and various other quantities and vectors such as the vector of number of vertices (i.e., number of data points) in the Delaunay triangles, number of data points in the convex hull of Yp points, indices of the Delaunay triangles for the data points, etc.

PE proximity regions are defined with respect to the Delaunay triangles based on Yp points with expansion parameter r \ge 1 and vertex regions in each triangle is based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle or based on circumcenter of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle). Each Delaunay triangle is first converted to a (nonscaled) basic triangle so that M will be the same type of center for each Delaunay triangle (this conversion is not necessary when M is CM).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). For the number of edges, loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on PE-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

num.edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle or circumcenter of each Delaunay triangle (for this, argument should be set as M="CC"), default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and related quantities for the induced subgraphs of the underlying or reflexivity graphs (of PE-PCD) in the Delaunay triangles

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the PE-PCD

num.edges

Total number of edges in all triangles, i.e., the number of edges for the entire underlying or reflexivity graphs of the PE-PCD

num.in.conv.hull

Number of Xp points in the convex hull of Yp points

num.in.tris

The vector of number of Xp points in the Delaunay triangles based on Yp points

weight.vec

The vector of the areas of Delaunay triangles based on Yp points

tri.num.edges

The vector of the number of edges of the components of the PE-PCD in the Delaunay triangles based on Yp points

del.tri.ind

A matrix of indices of vertices of the Delaunay triangles based on Yp points, each column corresponds to the vector of indices of the vertices of one triangle.

data.tri.ind

A vector of indices of vertices of the Delaunay triangles in which data points reside, i.e., column number of del.tri.ind for each Xp point.

tess.points

Points on which the tessellation of the study region is performed, here, tessellation is the Delaunay triangulation based on Yp points.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

num.edgesPEtri, num.edgesAS, num.edgesCS, and num.arcsPE

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-15; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="")

M<-c(1,1,1)

Nedges = num.edgesPE(Xp,Yp,r=1.5,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges in the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - standard equilateral triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) whose vertices are the given 2D numerical data set, Xp in the standard equilateral triangle. It also provides number of vertices (i.e., number of data points inside the triangle) and indices of the data points that reside in the triangle.

PE proximity region N_{PE}(x,r) is defined with respect to the standard equilateral triangle T_e=T(v=1,v=2,v=3)=T((0,0),(1,0),(1/2,\sqrt{3}/2)) with expansion parameter r \ge 1 and vertex 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. For the number of edges, loops are not allowed so edges are only possible for points inside T_e for this function.

See also (Ceyhan (2016)).

Usage

num.edgesPEstd.tri(
  Xp,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs based on the PE-PCD.

r

A positive real number which serves as the expansion parameter for PE proximity region; must be \ge 1.

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.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and quantities related to the standard equilateral triangle

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the PE-PCD

num.edges

Number of edges of the underlying or reflexivity graphs based on the PE-PCD with vertices in the standard equilateral triangle T_e

num.in.tri

Number of Xp points in the standard equilateral triangle, T_e

ind.in.tri

The vector of indices of the Xp points that reside in T_e

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle T_e.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

num.edgesPEtri, num.edgesPE, and num.arcsPEstd.tri

Examples

#\donttest{
A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2);
n<-10

set.seed(1)
Xp<-pcds::runif.std.tri(n)$gen.points

M<-c(.6,.2)

Nedges = num.edgesPEstd.tri(Xp,r=1.25,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Number of edges in the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - one triangle case

Description

An object of class "NumEdges". Returns the number of edges of the underlying or reflexivity graph of Proportional Edge Proximity Catch Digraphs (PE-PCDs) whose vertices are the given 2D numerical data set, Xp in a given triangle. It also provides number of vertices (i.e., number of data points inside the triangle) and indices of the data points that reside in the triangle.

PE proximity region N_{PE}(x,r) is defined with respect to the triangle, tri with expansion parameter r \ge 1 and vertex 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 or based on circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri. For the number of edges, loops are not allowed, so edges are only possible for points inside the triangle tri for this function.

See also (Ceyhan (2005, 2016)).

Usage

num.edgesPEtri(
  Xp,
  tri,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity")
)

Arguments

Xp

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

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

Value

A list with the elements

desc

A short description of the output: number of edges and quantities related to the triangle

und.graph

Type of the graph as "Underlying" or "Reflexivity" for the PE-PCD

num.edges

Number of edges of the underlying or reflexivity graphs based on the PE-PCD with vertices in the given triangle tri

num.in.tri

Number of Xp points in the triangle, tri

ind.in.tri

The vector of indices of the Xp points that reside in the triangle

tess.points

Tessellation points, i.e., points on which the tessellation of the study region is performed, here, tessellation is the support triangle.

vertices

Vertices of the underlying or reflexivity graph, Xp.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

num.edgesPE, num.edgesAStri, num.edgesCStri, and num.arcsPEtri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);

n<-10
set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)

Nedges = num.edgesPEtri(Xp,Tr,r=1.25,M)
Nedges
summary(Nedges)
plot(Nedges)
#}


Plot a NumEdges object

Description

Plots the scatter plot of the data points (i.e. vertices of the underlying or reflexivity graphs of the PCDs) and the Delaunay tessellation of the nontarget points marked with number of edges in the centroid of the Delaunay cells.

Usage

## S3 method for class 'NumEdges'
plot(x, Jit = 0.1, ...)

Arguments

x

Object of class NumEdges.

Jit

A positive real number that determines the amount of jitter along the y-axis, default is 0.1, for the 1D case, the vertices of the underlying or reflexivity graph of the PCD are jittered according to U(-Jit,Jit) distribution along the y-axis where Jit equals to the range of vertices and the interval end points; it is redundant in the 2D case.

...

Additional parameters for plot.

Value

None

See Also

print.NumEdges, summary.NumEdges, and print.summary.NumEdges

Examples

#\donttest{
nx<-15; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)  #try also M<-c(1,2,3)

Nedges = num.edgesAS(Xp,Yp,M)
Nedges
plot(Nedges)
#}


Plot an UndPCDs object

Description

Plots the vertices and the edges of the underlying or reflexivity graphs of the PCD together with the vertices and boundaries of the partition cells (i.e., intervals in the 1D case and triangles in the 2D case)

Usage

## S3 method for class 'UndPCDs'
plot(x, Jit = 0.1, ...)

Arguments

x

Object of class UndPCDs.

Jit

A positive real number that determines the amount of jitter along the y-axis, default is 0.1, for the 1D case, the vertices of the PCD are jittered according to U(-Jit,Jit) distribution along the y-axis where Jit equals to the range of vertices and the interval end points; it is redundant in the 2D case.

...

Additional parameters for plot.

Value

None

See Also

print.UndPCDs, summary.UndPCDs, and print.summary.UndPCDs

Examples

#\donttest{
nx<-20; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
M<-c(1,1,1)  #try also M<-c(1,2,3)
r<-1.5
Edges<-edgesPE(Xp,Yp,r,M)
Edges
plot(Edges)
#}


The plot of the edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) for 2D data - multiple triangle case

Description

Plots the edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) whose vertices are the data points in Xp in the multiple triangle case and the Delaunay triangles based on Yp points.

AS proximity regions are constructed with respect to the Delaunay triangles based on Yp points, i.e., AS proximity regions are defined only for Xp points inside the convex hull of Yp points. That is, edges may exist for Xp points only inside the convex hull of Yp points.

Vertex regions are based on the center M="CC" for circumcenter of each Delaunay triangle or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle; default is M="CC", i.e., circumcenter of each triangle. When the center is the circumcenter, CC, the vertex regions are constructed based on the orthogonal projections to the edges, while with any interior center M, the vertex regions are constructed using the extensions of the lines combining vertices with M.

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). Loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the AS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

plotASedges(
  Xp,
  Yp,
  M = "CC",
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the AS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

M

The center of the triangle. "CC" stands for circumcenter of each Delaunay triangle or 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle; default is M="CC", i.e., the circumcenter of each triangle.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the AS-PCD for a 2D data set Xp where AS proximity regions are defined with respect to the Delaunay triangles based on Yp points; also plots the Delaunay triangles based on Yp points.

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

plotASedges.tri, plotPEedges, plotCSedges, and plotASarcs

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)

plotASedges(Xp,Yp,M,xlab="",ylab="")
plotASedges(Xp,Yp,M,xlab="",ylab="",ugraph="r")
#}


The plot of the edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) for 2D data - one triangle case

Description

Plots the edges of the underlying or reflexivity graph of the Arc Slice Proximity Catch Digraph (AS-PCD) whose vertices are the data points, Xp and also the triangle tri. AS proximity regions are constructed with respect to the triangle tri, only for Xp points inside the triangle tri. i.e., edges may exist only for Xp points inside the triangle tri.

Vertex 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 or based on circumcenter of tri; default is M="CC", i.e., circumcenter of tri. When the center is the circumcenter, CC, the vertex regions are constructed based on the orthogonal projections to the edges, while with any interior center M, the vertex regions are constructed using the extensions of the lines combining vertices with M.

See also (Ceyhan (2005, 2016)).

Usage

plotASedges.tri(
  Xp,
  tri,
  M = "CC",
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  vert.reg = FALSE,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the AS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

M

The center of the triangle. "CC" stands for circumcenter of the triangle tri or a 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the triangle T_b; default is M="CC", i.e., the circumcenter of tri.

ugraph

The type of the graph based on AS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

vert.reg

A logical argument to add vertex regions to the plot, default is vert.reg=FALSE.

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the AS-PCD whose vertices are the points in data set Xp and also the triangle tri

A plot of the edges of the underlying or reflexivity graphs of the AS-PCD whose vertices are the points in data set Xp where AS proximity regions are defined with respect to the triangle tri; also plots the triangle tri

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

plotASedges, plotPEedges.tri, plotCSedges.tri, and plotASarcs.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
plotASedges.tri(Xp,Tr,M,vert.reg = TRUE,xlab="",ylab="")
plotASedges.tri(Xp,Tr,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="")

#can add vertex labels and text to the figure (with vertex regions)
ifelse(isTRUE(all.equal(M,pcds::circumcenter.tri(Tr))),
{Ds<-rbind((B+C)/2,(A+C)/2,(A+B)/2); cent.name="CC"},
{Ds<-pcds::prj.cent2edges(Tr,M); cent.name="M"})

txt<-rbind(Tr,M,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.04,-0.03,-.01)
yc<-txt[,2]+c(.02,.02,.02,.07,.02,.04,-.06)
txt.str<-c("A","B","C",cent.name,"D1","D2","D3")
text(xc,yc,txt.str)
#}


The plot of the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data - multiple triangle case

Description

Plots the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) whose vertices are the data points in Xp in the multiple triangle case and the Delaunay triangles based on Yp points.

CS proximity regions are constructed with respect to the Delaunay triangles based on Yp points, i.e., CS proximity regions are defined only for Xp points inside the convex hull of Yp points. That is, edges may exist for Xp points only inside the convex hull of Yp points.

Edge regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). Loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the CS-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

plotCSedges(
  Xp,
  Yp,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

t

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

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle, default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the CS-PCD whose vertices are the points in data set Xp and the Delaunay triangles based on Yp points

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

plotCSedges.tri, plotASedges, plotPEedges, and plotCSarcs

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)

t<-1.5

plotCSedges(Xp,Yp,t,M,xlab="",ylab="")
plotCSedges(Xp,Yp,t,M,xlab="",ylab="",ugraph="r")
#}


The plot of the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) for 2D data - one triangle case

Description

Plots the edges of the underlying or reflexivity graphs of the Central Similarity Proximity Catch Digraph (CS-PCD) whose vertices are the data points, Xp and the triangle tri. CS proximity regions are constructed with respect to the triangle tri with expansion parameter t > 0, i.e., edges may exist only for Xp points inside the triangle tri.

Edge regions are based on 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. With any interior center M, the edge regions are constructed using the extensions of the lines combining vertices with M.

See also (Ceyhan (2005, 2016)).

Usage

plotCSedges.tri(
  Xp,
  tri,
  t,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  edge.reg = FALSE,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

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.

ugraph

The type of the graph based on CS-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

edge.reg

A logical argument to add edge regions to the plot, default is edge.reg=FALSE.

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the CS-PCD whose vertices are the points in data set Xp and the triangle tri

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

plotCSedges, plotASedges.tri, plotPEedges.tri, and plotCSarcs.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
t<-1.5
plotCSedges.tri(Xp,Tr,t,M,edge.reg = TRUE,xlab="",ylab="")
plotCSedges.tri(Xp,Tr,t,M,ugraph="r",edge.reg = TRUE,xlab="",ylab="")

#can add vertex labels and text to the figure (with edge regions)
Ds<-pcds::prj.cent2edges(Tr,M); cent.name="M"

txt<-rbind(Tr,M,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.04,-0.03,-.01)
yc<-txt[,2]+c(.02,.02,.02,.07,.02,.04,-.06)
txt.str<-c("A","B","C",cent.name,"D1","D2","D3")
text(xc,yc,txt.str)
#}


The plot of the edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data - multiple triangle case

Description

Plots the edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) whose vertices are the data points in Xp in the multiple triangle case and the Delaunay triangles based on Yp points.

PE proximity regions are constructed with respect to the Delaunay triangles based on Yp points, i.e., PE proximity regions are defined only for Xp points inside the convex hull of Yp points. That is, edges may exist for Xp points only inside the convex hull of Yp points.

Vertex regions in each triangle are based on the center M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of each Delaunay triangle or based on circumcenter of each Delaunay triangle (default for M=(1,1,1) which is the center of mass of the triangle).

Convex hull of Yp is partitioned by the Delaunay triangles based on Yp points (i.e., multiple triangles are the set of these Delaunay triangles whose union constitutes the convex hull of Yp points). Loops are not allowed so edges are only possible for points inside the convex hull of Yp points.

See (Ceyhan (2005, 2016)) for more on the PE-PCDs. Also, see (Okabe et al. (2000); Ceyhan (2010); Sinclair (2016)) for more on Delaunay triangulation and the corresponding algorithm.

Usage

plotPEedges(
  Xp,
  Yp,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the PE-PCD.

Yp

A set of 2D points which constitute the vertices of the Delaunay triangles.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

M

A 3D point in barycentric coordinates which serves as a center in the interior of each Delaunay triangle or circumcenter of each Delaunay triangle (for this, argument should be set as M="CC"), default for M=(1,1,1) which is the center of mass of each triangle.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the PE-PCD whose vertices are the points in data set Xp and the Delaunay triangles based on Yp points

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2010). “Extension of One-Dimensional Proximity Regions to Higher Dimensions.” Computational Geometry: Theory and Applications, 43(9), 721-748.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

Okabe A, Boots B, Sugihara K, Chiu SN (2000). Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. Wiley, New York.

Sinclair D (2016). “S-hull: a fast radial sweep-hull routine for Delaunay triangulation.” 1604.01428.

See Also

plotPEedges.tri, plotASedges, plotCSedges, and plotPEarcs

Examples

#\donttest{
#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-20; ny<-5;

set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)
r<-1.5

plotPEedges(Xp,Yp,r,M,xlab="",ylab="")
plotPEedges(Xp,Yp,r,M,xlab="",ylab="",ugraph="r")
#}


The plot of the edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) for 2D data - one triangle case

Description

Plots the edges of the underlying or reflexivity graph of the Proportional Edge Proximity Catch Digraph (PE-PCD) whose vertices are the data points, Xp and the triangle tri. PE proximity regions are constructed with respect to the triangle tri with expansion parameter r \ge 1, i.e., edges may exist only for Xp points inside the triangle tri.

Vertex regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri or based on the circumcenter of tri; default is M=(1,1,1), i.e., the center of mass of tri. When the center is the circumcenter, CC, the vertex regions are constructed based on the orthogonal projections to the edges, while with any interior center M, the vertex regions are constructed using the extensions of the lines combining vertices with M. M-vertex regions are recommended spatial inference, due to geometry invariance property of the edge density and domination number the PE-PCDs based on uniform data.

See also (Ceyhan (2005, 2016)).

Usage

plotPEedges.tri(
  Xp,
  tri,
  r,
  M = c(1, 1, 1),
  ugraph = c("underlying", "reflexivity"),
  asp = NA,
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  vert.reg = FALSE,
  ...
)

Arguments

Xp

A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the PE-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

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 or the circumcenter of tri which may be entered as "CC" as well; default is M=(1,1,1), i.e., the center of mass of tri.

ugraph

The type of the graph based on PE-PCDs, "underlying" is for the underlying graph, and "reflexivity" is for the reflexivity graph (default is "underlying").

asp

A numeric value, giving the aspect ratio y/x (default is NA), see the official help page for asp by typing "? asp".

main

An overall title for the plot (default=NULL).

xlab, ylab

Titles for the x and y axes, respectively (default=NULL for both).

xlim, ylim

Two numeric vectors of length 2, giving the x- and y-coordinate ranges (default=NULL for both).

vert.reg

A logical argument to add vertex regions to the plot, default is vert.reg=FALSE.

...

Additional plot parameters.

Value

A plot of the edges of the underlying or reflexivity graphs of the PE-PCD whose vertices are the points in data set Xp and the triangle tri

Author(s)

Elvan Ceyhan

References

Ceyhan E (2005). An Investigation of Proximity Catch Digraphs in Delaunay Tessellations, also available as technical monograph titled Proximity Catch Digraphs: Auxiliary Tools, Properties, and Applications. Ph.D. thesis, The Johns Hopkins University, Baltimore, MD, 21218.

Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.

See Also

plotPEedges, plotASedges.tri, plotCSedges.tri, and plotPEarcs.tri

Examples

#\donttest{
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10

set.seed(1)
Xp<-pcds::runif.tri(n,Tr)$g

M<-as.numeric(pcds::runif.tri(1,Tr)$g)
r<-1.5
plotPEedges.tri(Xp,Tr,r,M,vert.reg = TRUE,xlab="",ylab="")
plotPEedges.tri(Xp,Tr,r,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="")

#can add vertex labels and text to the figure (with vertex regions)
ifelse(isTRUE(all.equal(M,pcds::circumcenter.tri(Tr))),
{Ds<-rbind((B+C)/2,(A+C)/2,(A+B)/2); cent.name="CC"},
{Ds<-pcds::prj.cent2edges(Tr,M); cent.name="M"})

txt<-rbind(Tr,M,Ds)
xc<-txt[,1]+c(-.02,.02,.02,.02,.04,-0.03,-.01)
yc<-txt[,2]+c(.02,.02,.02,.07,.02,.04,-.06)
txt.str<-c("A","B","C",cent.name,"D1","D2","D3")
text(xc,yc,txt.str)
#}


Print a NumEdges object

Description

Prints the call of the object of class "NumEdges" and also the desc (i.e. a brief description) of the output.

Usage

## S3 method for class 'NumEdges'
print(x, ...)

Arguments

x

A NumEdges object.

...

Additional arguments for the S3 method 'print'.

Value

The call of the object of class "NumEdges" and also the desc (i.e. a brief description) of the output: number of edges in the underlying or reflexivity graph of the proximity catch digraph (PCD) and related quantities in the induced subgraphs for points in the Delaunay cells.

See Also

summary.NumEdges, print.summary.NumEdges, and plot.NumEdges

Examples

#\donttest{
nx<-15; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)  #try also M<-c(1,2,3)

Nedges = num.edgesAS(Xp,Yp,M)
Nedges
print(Nedges)

typeof(Nedges)
attributes(Nedges)
#}


Print a UndPCDs object

Description

Prints the call of the object of class "UndPCDs" and also the type (i.e. a brief description) of the underlying and reflexivity graphs of the proximity catch digraph (PCD).

Usage

## S3 method for class 'UndPCDs'
print(x, ...)

Arguments

x

An UndPCDs object.

...

Additional arguments for the S3 method 'print'.

Value

The call of the object of class "UndPCDs" and also the type (i.e. a brief description) of the underlying or reflexivity graphs of the proximity catch digraph (PCD).

See Also

summary.UndPCDs, print.summary.UndPCDs, and plot.UndPCDs

Examples

#\donttest{
nx<-20; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
M<-c(1,1,1)  #try also M<-c(1,2,3)
r<-1.5
Edges<-edgesPE(Xp,Yp,r,M)
Edges
print(Edges)

typeof(Edges)
attributes(Edges)
#}


Print a summary of a NumEdges object

Description

Prints some information about the object.

Usage

## S3 method for class 'summary.NumEdges'
print(x, ...)

Arguments

x

An object of class "summary.NumEdges", generated by summary.NumEdges.

...

Additional parameters for print.

Value

None

See Also

print.NumEdges, summary.NumEdges, and plot.NumEdges


Print a summary of an UndPCDs object

Description

Prints some information about the object.

Usage

## S3 method for class 'summary.UndPCDs'
print(x, ...)

Arguments

x

An object of class "summary.UndPCDs", generated by summary.UndPCDs.

...

Additional parameters for print.

Value

None

See Also

print.UndPCDs, summary.UndPCDs, and plot.UndPCDs


Return a summary of a NumEdges object

Description

Returns the below information about the object:

call of the function defining the object, the description of the output, desc, and type of the graph as "underlying" or "reflexivity", number of edges in the underlying or reflexivity graph of the proximity catch digraph (PCD) and related quantities in the induced subgraphs for points in the Delaunay cells. In the one Delaunay cell case, the function provides the total number of edges in the underlying or reflexivity graph, vertices of Delaunay cell, and indices of target points in the Delaunay cell.

In the multiple Delaunay cell case, the function provides total number of edges in the underlying or reflexivity graph, number of edges for the induced subgraphs for points in the Delaunay cells, vertices of Delaunay cells or indices of points that form the the Delaunay cells, indices of target points in the convex hull of nontarget points, indices of Delaunay cells in which points reside, and area or length of the the Delaunay cells.

Usage

## S3 method for class 'NumEdges'
summary(object, ...)

Arguments

object

An object of class NumEdges.

...

Additional parameters for summary.

Value

The call of the object of class "NumEdges", the desc of the output, the type of the graph as "underlying" or "reflexivity", total number of edges in the underlying or reflexivity graph. Moreover, in the one Delaunay cell case, the function also provides vertices of Delaunay cell, and indices of target points in the Delaunay cell; and in the multiple Delaunay cell case, it also provides number of edges for the induced subgraphs for points in the Delaunay cells, vertices of Delaunay cells or indices of points that form the the Delaunay cells, indices of target points in the convex hull of nontarget points, indices of Delaunay cells in which points reside, and area or length of the the Delaunay cells.

See Also

print.NumEdges, print.summary.NumEdges, and plot.NumEdges

Examples

#\donttest{
nx<-15; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx),runif(nx))
Yp<-cbind(runif(ny,0,.25),
runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))

M<-c(1,1,1)  #try also M<-c(1,2,3)

Nedges = num.edgesAS(Xp,Yp,M)
Nedges
summary(Nedges)
#}


Return a summary of an UndPCDs object

Description

Returns the below information about the object:

call of the function defining the object, the type (i.e. the description) of the underlying or reflexivity graph of the proximity catch digraph (PCD), some of the partition (i.e. intervalization in the 1D case and triangulation in the 2D case) points (i.e., vertices of the intervals or the triangles), parameter of the underlying or reflexivity graphs of the PCD, and various quantities (number of vertices, number of edges and edge density of the underlying or reflexivity graphs of the PCDs, number of vertices for the partition and number of partition cells (i.e., intervals or triangles)).

Usage

## S3 method for class 'UndPCDs'
summary(object, ...)

Arguments

object

An object of class UndPCDs.

...

Additional parameters for summary.

Value

The call of the object of class "UndPCDs", the type (i.e. the description) of the underlying or reflexivity graphs of the proximity catch digraph (PCD), some of the partition (i.e. intervalization in the 1D case and triangulation in the 2D case) points (i.e., vertices of the intervals or the triangles), parameters of the underlying or reflexivity graph of the PCD, and various quantities (number of vertices, number of edges and edge density of the underlying or reflexivity graphs of the PCDs, number of vertices for the partition and number of partition cells (i.e., intervals or triangles)).

See Also

print.UndPCDs, print.summary.UndPCDs, and plot.UndPCDs

Examples

#\donttest{
nx<-20; ny<-5;
set.seed(1)
Xp<-cbind(runif(nx,0,1),runif(nx,0,1))
Yp<-cbind(runif(ny,0,.25),runif(ny,0,.25))+cbind(c(0,0,0.5,1,1),c(0,1,.5,0,1))
M<-c(1,1,1)  #try also M<-c(1,2,3)
r<-1.5
Edges<-edgesPE(Xp,Yp,r,M)
Edges
summary(Edges)
#}