| Title: | Underlying Graphs of Proximity Catch Digraphs and Their Applications |
|---|---|
| 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. |
| Authors: | Elvan Ceyhan |
| Maintainer: | Elvan Ceyhan <[email protected]> |
| License: | GPL-2 |
| Version: | 0.1.0 |
| Built: | 2026-05-14 09:16:26 UTC |
| Source: | https://github.com/elvanceyhan/pcds.ugraph |
.onAttach start message
.onAttach(libname, pkgname).onAttach(libname, pkgname)
libname |
defunct |
pkgname |
defunct |
invisible()
.onLoad getOption package settings
.onLoad(libname, pkgname).onLoad(libname, pkgname)
libname |
defunct |
pkgname |
defunct |
invisible()
getOption("pcds.ugraph.name")getOption("pcds.ugraph.name")
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 in Cartesian coordinates
or 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)).
ASedge.dens.tri( Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )ASedge.dens.tri( Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD. |
tri |
A |
M |
The center of the triangle.
|
ugraph |
The type of the graph based on AS-PCDs,
|
in.tri.only |
A logical argument (default is |
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.
Elvan Ceyhan
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.
PEedge.dens.tri, CSedge.dens.tri,
and ASarc.dens.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)
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,
-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 and -edge regions
(i.e., the test is not available for a general center
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.
CSedge.dens.test( Xp, Yp, t, ugraph = c("underlying", "reflexivity"), ch.cor = FALSE, alternative = c("two.sided", "less", "greater"), conf.level = 0.95 )CSedge.dens.test( Xp, Yp, t, ugraph = c("underlying", "reflexivity"), ch.cor = FALSE, alternative = c("two.sided", "less", "greater"), conf.level = 0.95 )
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,
|
ch.cor |
A logical argument for convex hull correction,
default |
alternative |
Type of the alternative hypothesis in the test,
one of |
conf.level |
Level of the confidence interval,
default is |
A list with the elements
statistic |
Test statistic |
p.value |
The |
conf.int |
Confidence interval for the edge density
at the given confidence level |
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 |
method |
Description of the hypothesis test |
data.name |
Name of the data set |
Elvan Ceyhan
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.
PEedge.dens.test and CSarc.dens.test
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-100; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,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 ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-100; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,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 ## End(Not run)
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 and edge regions are
based on center in Cartesian coordinates or
in barycentric coordinates
in the interior of the triangle tri; default is , 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)).
CSedge.dens.tri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )CSedge.dens.tri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
in.tri.only |
A logical argument (default is |
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, |
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 |
Elvan Ceyhan
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.
ASedge.dens.tri, PEedge.dens.tri,
and CSarc.dens.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)
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 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 ).
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.
edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))
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.
|
ugraph |
The type of the graph based on AS-PCDs,
|
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 |
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 |
tess.name |
Name of the tessellation points |
vertices |
Vertices of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesAStri, edgesPE,
edgesCS, and arcsAS
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) Edges<-edgesAS(Xp,Yp,M) #or try Edges<-edgesAS(Xp,Yp,M,ugraph="r") #or try with the default center Edges<-edgesAS(Xp,Yp) Edges summary(Edges) plot(Edges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) Edges<-edgesAS(Xp,Yp,M) #or try Edges<-edgesAS(Xp,Yp,M,ugraph="r") #or try with the default center Edges<-edgesAS(Xp,Yp) Edges summary(Edges) plot(Edges) ## End(Not run)
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, in Cartesian coordinates
or 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)).
edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD. |
tri |
A |
M |
The center of the triangle.
|
ugraph |
The type of the graph based on AS-PCDs,
|
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 |
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 |
vertices |
Vertices of the underlying
or reflexivity graph of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesAS, edgesPEtri,
edgesCStri, and arcsAStri
## Not run: 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) #try also M<-c(1.6,1.0) #for underlying graph Edges<-edgesAStri(Xp,Tr,M) #for reflexivity graph, try Edges<-edgesAStri(Xp,Tr,M,ugraph="r") #or try with the default center Edges<-edgesAStri(Xp,Tr); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesAStri(Xp,Tr,M,ugraph="r") #or try with the default center Edges<-edgesAStri(Xp,Tr); M= (Edges$param)$cent 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) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) #for underlying graph Edges<-edgesAStri(Xp,Tr,M) #for reflexivity graph, try Edges<-edgesAStri(Xp,Tr,M,ugraph="r") #or try with the default center Edges<-edgesAStri(Xp,Tr); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesAStri(Xp,Tr,M,ugraph="r") #or try with the default center Edges<-edgesAStri(Xp,Tr); M= (Edges$param)$cent 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) ## End(Not run)
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 and
edge regions in each triangle are
based on the center
in barycentric coordinates
in the interior of each Delaunay triangle
(default for
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 ).
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.
edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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 |
tess.points |
Tessellation points, i.e., points on which the tessellation
of the study region is performed, here, tessellation
is Delaunay triangulation based on |
tess.name |
Name of the tessellation points |
vertices |
Vertices of the underlying and
reflexivity graph of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesCStri, edgesAS, edgesPE,
and arcsCS
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 Edges<-edgesCS(Xp,Yp,t,M) #or try with the default center Edges<-edgesCS(Xp,Yp,t) Edges summary(Edges) plot(Edges) Edges<-edgesCS(Xp,Yp,t,M,ugraph="r") #or try with the default center Edges<-edgesCS(Xp,Yp,t) Edges summary(Edges) plot(Edges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 Edges<-edgesCS(Xp,Yp,t,M) #or try with the default center Edges<-edgesCS(Xp,Yp,t) Edges summary(Edges) plot(Edges) Edges<-edgesCS(Xp,Yp,t,M,ugraph="r") #or try with the default center Edges<-edgesCS(Xp,Yp,t) Edges summary(Edges) plot(Edges) ## End(Not run)
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 , 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
in Cartesian coordinates or
in barycentric coordinates in the interior of
the triangle tri;
default is , 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)).
edgesCStri(Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))edgesCStri(Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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 |
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 |
vertices |
Vertices of the underlying
or reflexivity graph of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesCS, edgesAStri, edgesPEtri,
and arcsCStri
## Not run: 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) #try also M<-c(1.6,1.0) t<-1.5 #try also t<-2 #for underlying graph Edges<-edgesCStri(Xp,Tr,t,M) #or try with the default center Edges<-edgesCStri(Xp,Tr,t); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesCStri(Xp,Tr,t,M,ugraph="r") #or try with the default center Edges<-edgesCStri(Xp,Tr,t); M= (Edges$param)$cent 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 txr<-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) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) t<-1.5 #try also t<-2 #for underlying graph Edges<-edgesCStri(Xp,Tr,t,M) #or try with the default center Edges<-edgesCStri(Xp,Tr,t); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesCStri(Xp,Tr,t,M,ugraph="r") #or try with the default center Edges<-edgesCStri(Xp,Tr,t); M= (Edges$param)$cent 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 txr<-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) ## End(Not run)
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 and
vertex regions in each triangle are
based on the center
in barycentric coordinates
in the interior of each Delaunay triangle or
based on circumcenter of each Delaunay triangle
(default for
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 ).
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.
edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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 |
tess.points |
Tessellation points, i.e., points on which the tessellation
of the study region is performed, here, tessellation
is Delaunay triangulation based on |
tess.name |
Name of the tessellation points |
vertices |
Vertices of the underlying
or reflexivity graph of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesPEtri, edgesAS, edgesCS,
and arcsPE
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 Edges<-edgesPE(Xp,Yp,r,M) #try also Edges<-edgesPE(Xp,Yp,r,M,ugraph="r") #or try with the default center Edges<-edgesPE(Xp,Yp,r) Edges summary(Edges) plot(Edges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 Edges<-edgesPE(Xp,Yp,r,M) #try also Edges<-edgesPE(Xp,Yp,r,M,ugraph="r") #or try with the default center Edges<-edgesPE(Xp,Yp,r) Edges summary(Edges) plot(Edges) ## End(Not run)
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 , 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
in Cartesian coordinates or
in barycentric coordinates in the interior of
the triangle tri or based on the circumcenter of tri;
default is , 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)).
edgesPEtri(Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))edgesPEtri(Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD. |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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 |
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 |
vertices |
Vertices of the underlying
or reflexivity graph of the digraph, |
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 |
mtitle |
Text for |
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. |
Elvan Ceyhan
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.
edgesPE, edgesAStri, edgesCStri,
and arcsPEtri
## Not run: 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) #try also M<-c(1.6,1.0) r<-1.5 #try also r<-2 #for underlying graph Edges<-edgesPEtri(Xp,Tr,r,M) #or try with the default center Edges<-edgesPEtri(Xp,Tr,r); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesPEtri(Xp,Tr,r,M,ugraph="r") #or try with the default center Edges<-edgesPEtri(Xp,Tr,r); M= (Edges$param)$cent 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) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) r<-1.5 #try also r<-2 #for underlying graph Edges<-edgesPEtri(Xp,Tr,r,M) #or try with the default center Edges<-edgesPEtri(Xp,Tr,r); M= (Edges$param)$cent Edges summary(Edges) plot(Edges) #for reflexivity graph Edges<-edgesPEtri(Xp,Tr,r,M,ugraph="r") #or try with the default center Edges<-edgesPEtri(Xp,Tr,r); M= (Edges$param)$cent 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) ## End(Not run)
The mean and (asymptotic) variance functions
for the underlying or reflexivity graphs of
Central Similarity Proximity Catch Digraphs (CS-PCDs):
muOrCS2D and asyvarOrCS2D for the underlying graph
and
muAndCS2D and asyvarAndCS2D 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, asyvarOrCS2D and asyvarAndCS2D 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
with respect to the triangle in which the points reside and
edge regions are based on center of mass, of the triangle.
See also (Ceyhan (2016)).
muOrCS2D(t) muAndCS2D(t) mu.undCS2D(t, ugraph = c("underlying", "reflexivity")) asyvarOrCS2D(t) asyvarAndCS2D(t) asy.var.undCS2D(t, ugraph = c("underlying", "reflexivity"))muOrCS2D(t) muAndCS2D(t) mu.undCS2D(t, ugraph = c("underlying", "reflexivity")) asyvarOrCS2D(t) asyvarAndCS2D(t) asy.var.undCS2D(t, ugraph = c("underlying", "reflexivity"))
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,
|
mu.undCS2D returns the mean
and asyvarUndOrCS2D 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, asyvarOrCS2D,
and asyvarAndCS2D 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.
Elvan Ceyhan
Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.
mu.undCS2D, asy.var.undCS2D
muCS2D, and asyvarCS2D,
## Not run: 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) ## End(Not run) ## Not run: asy.var.undCS2D(1.2) asy.var.undCS2D(1.2,ugraph="r") asyvarOrCS2D(.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")) } 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) ## End(Not run)## Not run: 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) ## End(Not run) ## Not run: asy.var.undCS2D(1.2) asy.var.undCS2D(1.2,ugraph="r") asyvarOrCS2D(.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")) } 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) ## End(Not run)
The mean and (asymptotic) variance functions
for the underlying or reflexivity graph of
Proportional Edge Proximity Catch Digraphs (PE-PCDs):
muOrPE2D and asyvarOrPE2D for the underlying graph
and
muAndPE2D and asyvarAndPE2D 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,
asyvarOrPE2D and asyvarAndPE2D 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
with respect to the triangle in which the points reside and
vertex regions are based on center of mass, of the triangle.
See also (Ceyhan (2016)).
muOrPE2D(r) muAndPE2D(r) mu.undPE2D(r, ugraph = c("underlying", "reflexivity")) asyvarOrPE2D(r) asyvarAndPE2D(r) asy.var.undPE2D(r, ugraph = c("underlying", "reflexivity"))muOrPE2D(r) muAndPE2D(r) mu.undPE2D(r, ugraph = c("underlying", "reflexivity")) asyvarOrPE2D(r) asyvarAndPE2D(r) asy.var.undPE2D(r, ugraph = c("underlying", "reflexivity"))
r |
A positive real number which serves
as the expansion parameter in PE proximity region;
must be |
ugraph |
The type of the graph based on PE-PCDs,
|
mu.undPE2D returns the mean
and asyvarUndOrPE2D 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, asyvarOrPE2D,
and asyvarAndPE2D 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.
Elvan Ceyhan
Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.
#' mu.undCS2D, asy.var.undCS2D,
muPE2D, asyvarPE2D,
muAndCS2D, and asyvarAndCS2D
## Not run: 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) ## End(Not run) ## Not run: 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")) } 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) ## End(Not run)## Not run: 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) ## End(Not run) ## Not run: 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")) } 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) ## End(Not run)
Returns 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 **or** p1 is in ,
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 **and** p1 is in ,
returns 0 otherwise.
AS proximity region is constructed in the standard basic triangle
where is in , and .
Vertex regions are based on the center, in Cartesian coordinates
or in barycentric coordinates
in the interior of the standard basic triangle
or based on circumcenter of ;
default is M="CC", i.e., circumcenter of .
If p1 and p2 are distinct
and either of them are outside , 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)).
IedgeASbasic.tri( p1, p2, c1, c2, M = "CC", ugraph = c("underlying", "reflexivity") )IedgeASbasic.tri( p1, p2, c1, c2, M = "CC", ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose AS proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
c1, c2
|
Positive real numbers
which constitute the vertex of the standard basic triangle
adjacent to the shorter edges;
|
M |
The center of the triangle. |
ugraph |
The type of the graph based on AS-PCDs,
|
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.
Elvan Ceyhan
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.
IedgeAStri, IedgeCSbasic.tri,
IedgePEbasic.tri and IarcASbasic.tri
## Not run: 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") ## End(Not run)## Not run: 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") ## End(Not run)
Returns 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 **or** p1 is in ,
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 **and** p1 is in ,
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, in Cartesian coordinates
or 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)).
IedgeAStri(p1, p2, tri, M = "CC", ugraph = c("underlying", "reflexivity"))IedgeAStri(p1, p2, tri, M = "CC", ugraph = c("underlying", "reflexivity"))
p1 |
A 2D point whose AS proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
tri |
A |
M |
The center of the triangle. |
ugraph |
The type of the graph based on AS-PCDs,
|
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.
Elvan Ceyhan
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.
IedgeASbasic.tri, IedgePEtri,
IedgeCStri and IarcAStri
## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)
Returns 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 or p1 is in ,
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 and p1 is in ,
returns 0 otherwise.
In both cases is the CS proximity region for point
with expansion parameter .
CS proximity region is defined
with respect to the standard basic triangle
where is
in , and .
Edge regions are based on the center,
in Cartesian coordinates or in
barycentric coordinates
in the interior of the standard basic triangle ;
default is ,
i.e., the center of mass of .
If p1 and p2 are distinct
and either of them are outside , 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)).
IedgeCSbasic.tri( p1, p2, t, c1, c2, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgeCSbasic.tri( p1, p2, t, c1, c2, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose CS proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
t |
A positive real number
which serves as the expansion parameter
in CS proximity region; must be |
c1, c2
|
Positive real numbers
which constitute the vertex of the standard basic triangle
adjacent to the shorter edges;
|
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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.
Elvan Ceyhan
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.
IedgeCStri, IedgeASbasic.tri,
IedgePEbasic.tri and IarcCSbasic.tri
## Not run: 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="a") ## End(Not run)## Not run: 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="a") ## End(Not run)
Returns 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 or p1 is in ,
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 and p1 is in ,
returns 0 otherwise.
In both cases is the CS proximity region
for point with expansion parameter .
CS proximity region is defined
with respect to the standard equilateral triangle
and edge regions are based on the center
in Cartesian coordinates or
in barycentric coordinates in the interior of ;
default is i.e., the center of mass of .
If p1 and p2 are distinct
and either of them are outside , 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)).
IedgeCSstd.tri( p1, p2, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgeCSstd.tri( p1, p2, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose CS proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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.
Elvan Ceyhan
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.
IedgeCSbasic.tri, IedgeCStri,
and IarcCSstd.tri
## Not run: 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) #try also M<-c(.6,.2) 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") ## End(Not run)## Not run: 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) #try also M<-c(.6,.2) 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") ## End(Not run)
Returns 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 or p1 is in ,
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 and p1 is in ,
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,
in Cartesian coordinates or
in barycentric coordinates
in the interior of tri;
default is , 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)).
IedgeCStri( p1, p2, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgeCStri( p1, p2, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose CS proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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.
Elvan Ceyhan
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.
IedgeCSbasic.tri, IedgeAStri,
IedgePEtri and IarcCStri
## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)
Returns 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 **or** p1 is in ,
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 **and** p1 is in ,
returns 0 otherwise.
In both cases is the PE proximity region for point
with expansion parameter .
PE proximity region is defined
with respect to the standard basic triangle
where is
in , and .
Vertex regions are based on the center, in Cartesian coordinates
or in barycentric coordinates
in the interior of the standard basic triangle
or based on circumcenter of ;
default is i.e., the center of mass of .
If p1 and p2 are distinct
and either of them are outside , 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)).
IedgePEbasic.tri( p1, p2, r, c1, c2, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgePEbasic.tri( p1, p2, r, c1, c2, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose PE proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
r |
A positive real number
which serves as the expansion parameter
in PE proximity region; must be |
c1, c2
|
Positive real numbers
which constitute the vertex of the standard basic triangle
adjacent to the shorter edges;
|
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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.
Elvan Ceyhan
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.
IedgePEtri, IedgeASbasic.tri,
IedgeCSbasic.tri and IarcPEbasic.tri
## Not run: 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") ## End(Not run)## Not run: 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") ## End(Not run)
Returns 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 **or** p1 is in ,
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 **and** p1 is in ,
returns 0 otherwise.
In both cases is the PE proximity region
for point with expansion parameter .
PE proximity region is defined
with respect to the standard equilateral triangle
and vertex regions are based on the center
in Cartesian coordinates or
in barycentric coordinates in the interior of ;
default is i.e., the center of mass of .
If p1 and p2 are distinct
and either of them are outside , 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)).
IedgePEstd.tri( p1, p2, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgePEstd.tri( p1, p2, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose PE proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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.
Elvan Ceyhan
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.
IedgePEbasic.tri, IedgePEtri,
and IarcPEstd.tri
## Not run: 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) #try also M<-c(.6,.2) 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") ## End(Not run)## Not run: 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) #try also M<-c(.6,.2) 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") ## End(Not run)
Returns 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 or p1 is in ,
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 and p1 is in ,
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,
in Cartesian coordinates or
in barycentric coordinates
in the interior of tri
or based on the circumcenter of tri;
default is , 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)).
IedgePEtri( p1, p2, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )IedgePEtri( p1, p2, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
p1 |
A 2D point whose PE proximity region is constructed. |
p2 |
A 2D point. The function determines
whether there is an edge from |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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.
Elvan Ceyhan
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.
IedgePEbasic.tri, IedgeAStri,
IedgeCStri and IarcPEtri
## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0); 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") ## End(Not run)
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
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 ).
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.
inci.mat.undAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))inci.mat.undAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))
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.
|
ugraph |
The type of the graph based on AS-PCDs,
|
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.
Elvan Ceyhan
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.
inci.mat.undAStri, inci.mat.undPE,
inci.mat.undCS, and inci.matAS
## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) IM<-inci.mat.undAS(Xp,Yp,M) #try also IM<-inci.mat.undAS(Xp,Yp,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) IM<-inci.mat.undAS(Xp,Yp,M) #try also IM<-inci.mat.undAS(Xp,Yp,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)
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.
AS proximity regions are defined
with respect to the triangle tri and
vertex regions are based on the center, in Cartesian coordinates
or 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)).
inci.mat.undAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))inci.mat.undAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD. |
tri |
A |
M |
The center of the triangle.
|
ugraph |
The type of the graph based on AS-PCDs,
|
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
Elvan Ceyhan
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.
inci.mat.undAS, inci.mat.undPEtri,
inci.mat.undCStri, and inci.matAStri
## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undAStri(Xp,Tr,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) (IM<-inci.mat.undAStri(Xp,Tr,M,ugraph="r")) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undAStri(Xp,Tr,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) (IM<-inci.mat.undAStri(Xp,Tr,M,ugraph="r")) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)
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 and
edge regions in each triangle are
based on the center
in barycentric coordinates
in the interior of each Delaunay triangle
(default for
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 ).
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.
inci.mat.undCS( Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undCS( Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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.
Elvan Ceyhan
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.
inci.mat.undCStri, inci.mat.undAS,
inci.mat.undPE, and inci.matCS
## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 IM<-inci.mat.undCS(Xp,Yp,t,M) #try also IM<-inci.mat.undCS(Xp,Yp,t,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 IM<-inci.mat.undCS(Xp,Yp,t,M) #try also IM<-inci.mat.undCS(Xp,Yp,t,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)
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
.
CS proximity region is constructed
with respect to the standard equilateral triangle with
expansion parameter and edge regions are based on
the center in Cartesian coordinates
or in barycentric coordinates
in the interior of ; default is ,
i.e., the center of mass of .
Loops are allowed,
so the diagonal entries are all equal to 1.
See also (Ceyhan (2005, 2010)).
inci.mat.undCSstd.tri( Xp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undCSstd.tri( Xp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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.
Elvan Ceyhan
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.
inci.mat.undCStri, inci.mat.undCS,
and inci.matCSstd.tri
## Not run: 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) #try also M<-c(.6,.2) inc.mat<-inci.mat.undCSstd.tri(Xp,t=1.5,M) #try also inc.mat<-inci.mat.undCSstd.tri(Xp,t=1.5,M,ugraph="reflexivity") inc.mat (sum(inc.mat)-n)/2 num.edgesCSstd.tri(Xp,t=1.5,M)$num.edges #try also num.edgesCSstd.tri(Xp,t=1.5,M,ugraph="reflexivity")$num.edges pcds::dom.num.greedy(inc.mat) pcds::Idom.num.up.bnd(inc.mat,2) #try also pcds::dom.num.exact(inc.mat) ## End(Not run)## Not run: 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) #try also M<-c(.6,.2) inc.mat<-inci.mat.undCSstd.tri(Xp,t=1.5,M) #try also inc.mat<-inci.mat.undCSstd.tri(Xp,t=1.5,M,ugraph="reflexivity") inc.mat (sum(inc.mat)-n)/2 num.edgesCSstd.tri(Xp,t=1.5,M)$num.edges #try also num.edgesCSstd.tri(Xp,t=1.5,M,ugraph="reflexivity")$num.edges pcds::dom.num.greedy(inc.mat) pcds::Idom.num.up.bnd(inc.mat,2) #try also pcds::dom.num.exact(inc.mat) ## End(Not run)
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.
CS proximity regions are constructed with respect to triangle tri
with expansion parameter
and edge regions are based on the center
in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri;
default is , 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)).
inci.mat.undCStri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undCStri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the CS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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
Elvan Ceyhan
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.
inci.mat.undCS, inci.mat.undAStri,
inci.mat.undPEtri, and inci.matCStri
## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undCStri(Xp,Tr,t=1.5,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(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) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undCStri(Xp,Tr,t=1.5,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(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) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)
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 and
vertex regions in each triangle are
based on the center
in barycentric coordinates
in the interior of each Delaunay triangle
or based on circumcenter of each Delaunay triangle
(default for
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 ).
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.
inci.mat.undPE( Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undPE( Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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.
Elvan Ceyhan
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.
inci.mat.undPEtri, inci.mat.undAS,
inci.mat.undCS, and inci.matPE
## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 IM<-inci.mat.undPE(Xp,Yp,r,M) #try also IM<-inci.mat.undPE(Xp,Yp,r,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)## Not run: nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 IM<-inci.mat.undPE(Xp,Yp,r,M) #try also IM<-inci.mat.undPE(Xp,Yp,r,M,ugraph="r") IM pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(IM) #might take a long time in this brute-force fashion ignoring the #disconnected nature of the digraph inherent by the geometric construction of it ## End(Not run)
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
.
PE proximity region is constructed
with respect to the standard equilateral triangle with
expansion parameter and vertex regions are based on
the center in Cartesian coordinates
or in barycentric coordinates
in the interior of ; default is ,
i.e., the center of mass of .
Loops are allowed,
so the diagonal entries are all equal to 1.
See also (Ceyhan (2005, 2010)).
inci.mat.undPEstd.tri( Xp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undPEstd.tri( Xp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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.
Elvan Ceyhan
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.
inci.mat.undPEtri, inci.mat.undPE,
and inci.matPEstd.tri
## Not run: 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) #try also M<-c(.6,.2) inc.mat<-inci.mat.undPEstd.tri(Xp,r=1.25,M) #try also inc.mat<-inci.mat.undPEstd.tri(Xp,r=1.25,M,ugraph="reflexivity") inc.mat (sum(inc.mat)-n)/2 num.edgesPEstd.tri(Xp,r=1.25,M)$num.edges #try also num.edgesPEstd.tri(Xp,r=1.25,M,ugraph="reflexivity")$num.edges pcds::dom.num.greedy(inc.mat) pcds::Idom.num.up.bnd(inc.mat,2) #try also pcds::dom.num.exact(inc.mat) ## End(Not run)## Not run: 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) #try also M<-c(.6,.2) inc.mat<-inci.mat.undPEstd.tri(Xp,r=1.25,M) #try also inc.mat<-inci.mat.undPEstd.tri(Xp,r=1.25,M,ugraph="reflexivity") inc.mat (sum(inc.mat)-n)/2 num.edgesPEstd.tri(Xp,r=1.25,M)$num.edges #try also num.edgesPEstd.tri(Xp,r=1.25,M,ugraph="reflexivity")$num.edges pcds::dom.num.greedy(inc.mat) pcds::Idom.num.up.bnd(inc.mat,2) #try also pcds::dom.num.exact(inc.mat) ## End(Not run)
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.
PE proximity regions are constructed with respect to triangle tri
with expansion parameter
and vertex regions are based on the center
in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri;
default is , 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)).
inci.mat.undPEtri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )inci.mat.undPEtri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD. |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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
Elvan Ceyhan
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.
inci.mat.undPE, inci.mat.undAStri,
inci.mat.undCStri, and inci.matPEtri
## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undPEtri(Xp,Tr,r=1.25,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(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) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)## Not run: 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) #try also M<-c(1.6,1.0) (IM<-inci.mat.undPEtri(Xp,Tr,r=1.25,M)) pcds::dom.num.greedy(IM) #try also pcds::dom.num.exact(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) #try also pcds::dom.num.exact(IM) pcds::Idom.num.up.bnd(IM,3) ## End(Not run)
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 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 ).
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.
num.edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))num.edgesAS(Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"))
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.
|
ugraph |
The type of the graph based on AS-PCDs,
|
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 |
num.in.tris |
The vector of number of |
weight.vec |
The |
tri.num.edges |
The |
del.tri.ind |
A matrix of indices of vertices of
the Delaunay triangles based on |
data.tri.ind |
A |
tess.points |
Points on which the tessellation of the study region is performed,
here, tessellation is the Delaunay triangulation based on |
vertices |
Vertices of the underlying or reflexivity graph, |
Elvan Ceyhan
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.
num.edgesAStri, num.edgesPE,
num.edgesCS, and num.arcsAS
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesAS(Xp,Yp,M) #try also Nedges = num.edgesAS(Xp,Yp,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesAS(Xp,Yp,M) #try also Nedges = num.edgesAS(Xp,Yp,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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, in Cartesian coordinates
or 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)).
num.edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))num.edgesAStri(Xp, tri, M = "CC", ugraph = c("underlying", "reflexivity"))
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the AS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on AS-PCDs,
|
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 |
num.in.tri |
Number of |
ind.in.tri |
The vector of indices of the |
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, |
Elvan Ceyhan
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.
num.edgesAS, num.edgesPEtri,
num.edgesCStri, and num.arcsAStri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesAStri(Xp,Tr,M) #try also Nedges = num.edgesAStri(Xp,Tr,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesAStri(Xp,Tr,M) #try also Nedges = num.edgesAStri(Xp,Tr,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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
and edge regions in each triangle
is based on the center
in barycentric coordinates in the interior of each
Delaunay triangle (default for
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 ).
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.
num.edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))num.edgesCS(Xp, Yp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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 |
num.in.tris |
The vector of number of |
weight.vec |
The |
tri.num.edges |
The |
del.tri.ind |
A matrix of indices of vertices of
the Delaunay triangles based on |
data.tri.ind |
A |
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 |
vertices |
Vertices of the underlying or reflexivity graph, |
Elvan Ceyhan
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.
num.edgesCStri, num.edgesAS,
num.edgesPE, and num.arcsCS
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesCS(Xp,Yp,t=1.5,M) #try also Nedges = num.edgesCS(Xp,Yp,t=1.5,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesCS(Xp,Yp,t=1.5,M) #try also Nedges = num.edgesCS(Xp,Yp,t=1.5,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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 is defined
with respect to the standard equilateral triangle
with expansion parameter
and edge regions are based on the center
in Cartesian coordinates or
in barycentric coordinates in the interior of ;
default is , i.e., the center of mass of .
For the number of edges, loops are not allowed so
edges are only possible for points inside for this function.
See also (Ceyhan (2016)).
num.edgesCSstd.tri( Xp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )num.edgesCSstd.tri( Xp, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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 |
num.in.tri |
Number of |
ind.in.tri |
The vector of indices of the |
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, |
Elvan Ceyhan
Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.
num.edgesCStri, num.edgesCS,
and num.arcsCSstd.tri
## Not run: A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.std.tri(n)$gen.points M<-c(.6,.2) #try also M<-c(1,1,1) Nedges = num.edgesCSstd.tri(Xp,t=1.5,M) #try also Nedges = num.edgesCSstd.tri(Xp,t=1.5,M,ugraph = "reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.std.tri(n)$gen.points M<-c(.6,.2) #try also M<-c(1,1,1) Nedges = num.edgesCSstd.tri(Xp,t=1.5,M) #try also Nedges = num.edgesCSstd.tri(Xp,t=1.5,M,ugraph = "reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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 is defined
with respect to the triangle, tri
with expansion parameter and edge regions are
based on the center in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri;
default is , 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)).
num.edgesCStri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )num.edgesCStri( Xp, tri, t, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
Xp |
A set of 2D points which constitute the vertices of CS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
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 |
num.in.tri |
Number of |
ind.in.tri |
The vector of indices of the |
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, |
Elvan Ceyhan
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.
num.edgesCS, num.edgesAStri,
num.edgesPEtri, and num.arcsCStri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesCStri(Xp,Tr,t=1.5,M) #try also Nedges = num.edgesCStri(Xp,Tr,t=1.5,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesCStri(Xp,Tr,t=1.5,M) #try also Nedges = num.edgesCStri(Xp,Tr,t=1.5,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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
and vertex regions in each triangle
is based on the center
in barycentric coordinates in the interior of each
Delaunay triangle or based on circumcenter of each Delaunay triangle
(default for
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 ).
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.
num.edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))num.edgesPE(Xp, Yp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"))
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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 |
num.in.tris |
The vector of number of |
weight.vec |
The |
tri.num.edges |
The |
del.tri.ind |
A matrix of indices of vertices of
the Delaunay triangles based on |
data.tri.ind |
A |
tess.points |
Points on which the tessellation of the study region is performed,
here, tessellation is the Delaunay triangulation based on |
vertices |
Vertices of the underlying or reflexivity graph, |
Elvan Ceyhan
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.
num.edgesPEtri, num.edgesAS,
num.edgesCS, and num.arcsPE
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesPE(Xp,Yp,r=1.5,M) #try also Nedges = num.edgesPE(Xp,Yp,r=1.5,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-15; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) pcds::plotDelaunay.tri(Xp,Yp,xlab="",ylab="") M<-c(1,1,1) #try also M<-c(1,2,3) Nedges = num.edgesPE(Xp,Yp,r=1.5,M) #try also Nedges = num.edgesPE(Xp,Yp,r=1.5,M,ugraph="r") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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 is defined
with respect to the standard equilateral triangle
with expansion parameter
and vertex regions are based on the center
in Cartesian coordinates or
in barycentric coordinates in the interior of ;
default is , i.e., the center of mass of .
For the number of edges, loops are not allowed so
edges are only possible for points inside for this function.
See also (Ceyhan (2016)).
num.edgesPEstd.tri( Xp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )num.edgesPEstd.tri( Xp, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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 |
num.in.tri |
Number of |
ind.in.tri |
The vector of indices of the |
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, |
Elvan Ceyhan
Ceyhan E (2016). “Edge Density of New Graph Types Based on a Random Digraph Family.” Statistical Methodology, 33, 31-54.
num.edgesPEtri, num.edgesPE,
and num.arcsPEstd.tri
## Not run: A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.std.tri(n)$gen.points M<-c(.6,.2) #try also M<-c(1,1,1) Nedges = num.edgesPEstd.tri(Xp,r=1.25,M) #try also Nedges = num.edgesPEstd.tri(Xp,r=1.25,M,ugraph = "reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: A<-c(0,0); B<-c(1,0); C<-c(1/2,sqrt(3)/2); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.std.tri(n)$gen.points M<-c(.6,.2) #try also M<-c(1,1,1) Nedges = num.edgesPEstd.tri(Xp,r=1.25,M) #try also Nedges = num.edgesPEstd.tri(Xp,r=1.25,M,ugraph = "reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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 is defined
with respect to the triangle, tri
with expansion parameter and vertex regions are
based on the center in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri or
based on circumcenter of tri;
default is ,
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)).
num.edgesPEtri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )num.edgesPEtri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity") )
Xp |
A set of 2D points which constitute the vertices of PE-PCD. |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
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 |
num.in.tri |
Number of |
ind.in.tri |
The vector of indices of the |
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, |
Elvan Ceyhan
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.
num.edgesPE, num.edgesAStri,
num.edgesCStri, and num.arcsPEtri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesPEtri(Xp,Tr,r=1.25,M) #try also Nedges = num.edgesPEtri(Xp,Tr,r=1.25,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) Nedges = num.edgesPEtri(Xp,Tr,r=1.25,M) #try also Nedges = num.edgesPEtri(Xp,Tr,r=1.25,M,ugraph="reflexivity") Nedges summary(Nedges) plot(Nedges) ## End(Not run)
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.
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.
pcds.ugraph functionsThe pcds.ugraph functions can be grouped as AS-PCD Functions, PE-PCD Functions,
and CS-PCD Functions.
Contains the functions used in AS-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.
Contains the functions used in PE-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.
Contains the functions used in CS-PCD construction and computation of edge density of the corresponding underlying and reflexivity graph.
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 -factor proximity catch digraphs for testing spatial patterns of segregation and association.”
Computational Statistics & Data Analysis, 50(8), 1925-1964.
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,
-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 and -vertex regions
(i.e., the test is not available for a general center
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.
PEedge.dens.test( Xp, Yp, r, ugraph = c("underlying", "reflexivity"), ch.cor = FALSE, alternative = c("two.sided", "less", "greater"), conf.level = 0.95 )PEedge.dens.test( Xp, Yp, r, ugraph = c("underlying", "reflexivity"), ch.cor = FALSE, alternative = c("two.sided", "less", "greater"), conf.level = 0.95 )
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
ch.cor |
A logical argument for convex hull correction,
default |
alternative |
Type of the alternative hypothesis in the test,
one of |
conf.level |
Level of the confidence interval,
default is |
A list with the elements
statistic |
Test statistic |
p.value |
The |
conf.int |
Confidence interval for the edge density
at the given confidence level |
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 |
method |
Description of the hypothesis test |
data.name |
Name of the data set |
Elvan Ceyhan
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.
CSedge.dens.test and PEarc.dens.test
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-100; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,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 ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-100; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,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 ## End(Not run)
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 and vertex regions are
based on center in Cartesian coordinates or
in barycentric coordinates
in the interior of the triangle tri or based on
circumcenter of tri; default is , 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)).
PEedge.dens.tri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )PEedge.dens.tri( Xp, tri, r, M = c(1, 1, 1), ugraph = c("underlying", "reflexivity"), in.tri.only = FALSE )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graph of the PE-PCD. |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
in.tri.only |
A logical argument (default is |
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, |
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 |
Elvan Ceyhan
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.
ASedge.dens.tri, CSedge.dens.tri,
and PEarc.dens.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) #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") ## End(Not run)
NumEdges object
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.
## S3 method for class 'NumEdges' plot(x, Jit = 0.1, ...)## S3 method for class 'NumEdges' plot(x, Jit = 0.1, ...)
x |
Object of class |
Jit |
A positive real number
that determines the amount of jitter along the |
... |
Additional parameters for |
None
print.NumEdges, summary.NumEdges,
and print.summary.NumEdges
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)
UndPCDs object
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)
## S3 method for class 'UndPCDs' plot(x, Jit = 0.1, ...)## S3 method for class 'UndPCDs' plot(x, Jit = 0.1, ...)
x |
Object of class |
Jit |
A positive real number
that determines the amount of jitter along the |
... |
Additional parameters for |
None
print.UndPCDs, summary.UndPCDs,
and print.summary.UndPCDs
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)
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 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.
plotASedges( Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"), asp = NA, main = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, ... )plotASedges( Xp, Yp, M = "CC", ugraph = c("underlying", "reflexivity"), asp = NA, main = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL, ... )
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.
|
ugraph |
The type of the graph based on AS-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
... |
Additional |
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.
Elvan Ceyhan
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.
plotASedges.tri, plotPEedges,
plotCSedges, and plotASarcs
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) plotASedges(Xp,Yp,M,xlab="",ylab="") plotASedges(Xp,Yp,M,xlab="",ylab="",ugraph="r") ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) plotASedges(Xp,Yp,M,xlab="",ylab="") plotASedges(Xp,Yp,M,xlab="",ylab="",ugraph="r") ## End(Not run)
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, in Cartesian coordinates
or 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)).
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, ... )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, ... )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the AS-PCD. |
tri |
A |
M |
The center of the triangle.
|
ugraph |
The type of the graph based on AS-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
vert.reg |
A logical argument to add vertex regions to the plot,
default is |
... |
Additional |
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
Elvan Ceyhan
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.
plotASedges, plotPEedges.tri,
plotCSedges.tri, and plotASarcs.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) or M<-pcds::circumcenter.tri(Tr) plotASedges.tri(Xp,Tr,M,vert.reg = TRUE,xlab="",ylab="") plotASedges.tri(Xp,Tr,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="") # or try the default center #plotASedges.tri(Xp,Tr,main="Edges of AS-PCD", #xlab="",ylab="",vert.reg = TRUE); #M=(edgesAStri(Xp,Tr)$param)$cent #the part "M=(edgesAStri(Xp,Tr)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) or M<-pcds::circumcenter.tri(Tr) plotASedges.tri(Xp,Tr,M,vert.reg = TRUE,xlab="",ylab="") plotASedges.tri(Xp,Tr,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="") # or try the default center #plotASedges.tri(Xp,Tr,main="Edges of AS-PCD", #xlab="",ylab="",vert.reg = TRUE); #M=(edgesAStri(Xp,Tr)$param)$cent #the part "M=(edgesAStri(Xp,Tr)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)
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
in barycentric coordinates in the interior of each Delaunay triangle
(default for
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.
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, ... )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, ... )
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
... |
Additional |
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
Elvan Ceyhan
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.
plotCSedges.tri, plotASedges,
plotPEedges, and plotCSarcs
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 plotCSedges(Xp,Yp,t,M,xlab="",ylab="") plotCSedges(Xp,Yp,t,M,xlab="",ylab="",ugraph="r") ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) t<-1.5 #try also t<-2 plotCSedges(Xp,Yp,t,M,xlab="",ylab="") plotCSedges(Xp,Yp,t,M,xlab="",ylab="",ugraph="r") ## End(Not run)
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 ,
i.e., edges may exist only for Xp points inside the triangle tri.
Edge regions are based on center
in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri;
default is , 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)).
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, ... )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, ... )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the CS-PCD. |
tri |
A |
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 |
ugraph |
The type of the graph based on CS-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
edge.reg |
A logical argument to add edge regions to the plot,
default is |
... |
Additional |
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
Elvan Ceyhan
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.
plotCSedges, plotASedges.tri,
plotPEedges.tri, and plotCSarcs.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) t<-1.5 #try also t<-2 plotCSedges.tri(Xp,Tr,t,M,edge.reg = TRUE,xlab="",ylab="") plotCSedges.tri(Xp,Tr,t,M,ugraph="r",edge.reg = TRUE,xlab="",ylab="") # or try the default center #plotCSedges.tri(Xp,Tr,t,main="Edges of CS-PCD with t = 1.5", #xlab="",ylab="",edge.reg = TRUE); #M=(edgesCStri(Xp,Tr,t)$param)$cent #the part "M=(edgesCStri(Xp,Tr,t)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) t<-1.5 #try also t<-2 plotCSedges.tri(Xp,Tr,t,M,edge.reg = TRUE,xlab="",ylab="") plotCSedges.tri(Xp,Tr,t,M,ugraph="r",edge.reg = TRUE,xlab="",ylab="") # or try the default center #plotCSedges.tri(Xp,Tr,t,main="Edges of CS-PCD with t = 1.5", #xlab="",ylab="",edge.reg = TRUE); #M=(edgesCStri(Xp,Tr,t)$param)$cent #the part "M=(edgesCStri(Xp,Tr,t)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)
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
in barycentric coordinates in the interior of each Delaunay triangle
or based on circumcenter of
each Delaunay triangle (default for
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.
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, ... )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, ... )
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 |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
... |
Additional |
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
Elvan Ceyhan
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.
plotPEedges.tri, plotASedges,
plotCSedges, and plotPEarcs
## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 plotPEedges(Xp,Yp,r,M,xlab="",ylab="") plotPEedges(Xp,Yp,r,M,xlab="",ylab="",ugraph="r") ## End(Not run)## Not run: #nx is number of X points (target) and ny is number of Y points (nontarget) nx<-20; ny<-5; #try also nx<-40; ny<-10 or nx<-1000; ny<-10; 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)) #try also Yp<-cbind(runif(ny,0,1),runif(ny,0,1)) M<-c(1,1,1) #try also M<-c(1,2,3) r<-1.5 #try also r<-2 plotPEedges(Xp,Yp,r,M,xlab="",ylab="") plotPEedges(Xp,Yp,r,M,xlab="",ylab="",ugraph="r") ## End(Not run)
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 ,
i.e., edges may exist only for Xp points inside the triangle tri.
Vertex regions are based on center
in Cartesian coordinates
or in barycentric coordinates
in the interior of the triangle tri
or based on the circumcenter of tri;
default is , 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)).
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, ... )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, ... )
Xp |
A set of 2D points which constitute the vertices of the underlying or reflexivity graphs of the PE-PCD. |
tri |
A |
r |
A positive real number
which serves as the expansion parameter in PE proximity region;
must be |
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 |
ugraph |
The type of the graph based on PE-PCDs,
|
asp |
A |
main |
An overall title for the plot (default= |
xlab, ylab
|
Titles for the |
xlim, ylim
|
Two |
vert.reg |
A logical argument to add vertex regions to the plot,
default is |
... |
Additional |
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
Elvan Ceyhan
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.
plotPEedges, plotASedges.tri,
plotCSedges.tri, and plotPEarcs.tri
## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) or M<-pcds::circumcenter.tri(Tr) r<-1.5 #try also r<-2 plotPEedges.tri(Xp,Tr,r,M,vert.reg = TRUE,xlab="",ylab="") plotPEedges.tri(Xp,Tr,r,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="") # or try the default center #plotPEedges.tri(Xp,Tr,r,main="Edges of PE-PCD with r = 1.5", #xlab="",ylab="",vert.reg = TRUE); #M=(edgesPEtri(Xp,Tr,r)$param)$cent #the part "M=(edgesPEtri(Xp,Tr,r)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)## Not run: A<-c(1,1); B<-c(2,0); C<-c(1.5,2); Tr<-rbind(A,B,C); n<-10 #try also n<-20 set.seed(1) Xp<-pcds::runif.tri(n,Tr)$g M<-as.numeric(pcds::runif.tri(1,Tr)$g) #try also M<-c(1.6,1.0) or M<-pcds::circumcenter.tri(Tr) r<-1.5 #try also r<-2 plotPEedges.tri(Xp,Tr,r,M,vert.reg = TRUE,xlab="",ylab="") plotPEedges.tri(Xp,Tr,r,M,ugraph="r",vert.reg = TRUE,xlab="",ylab="") # or try the default center #plotPEedges.tri(Xp,Tr,r,main="Edges of PE-PCD with r = 1.5", #xlab="",ylab="",vert.reg = TRUE); #M=(edgesPEtri(Xp,Tr,r)$param)$cent #the part "M=(edgesPEtri(Xp,Tr,r)$param)$cent" is optional, #for the below annotation of the plot #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) ## End(Not run)
NumEdges object
Prints the call of the object
of class "NumEdges"
and also the desc (i.e. a brief description) of the output.
## S3 method for class 'NumEdges' print(x, ...)## S3 method for class 'NumEdges' print(x, ...)
x |
A |
... |
Additional arguments for the S3 method |
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.
summary.NumEdges, print.summary.NumEdges,
and plot.NumEdges
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)
NumEdges object
Prints some information about the object.
## S3 method for class 'summary.NumEdges' print(x, ...)## S3 method for class 'summary.NumEdges' print(x, ...)
x |
An |
... |
Additional parameters for |
None
print.NumEdges, summary.NumEdges,
and plot.NumEdges
UndPCDs object
Prints some information about the object.
## S3 method for class 'summary.UndPCDs' print(x, ...)## S3 method for class 'summary.UndPCDs' print(x, ...)
x |
An |
... |
Additional parameters for |
None
print.UndPCDs, summary.UndPCDs,
and plot.UndPCDs
UndPCDs object
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).
## S3 method for class 'UndPCDs' print(x, ...)## S3 method for class 'UndPCDs' print(x, ...)
x |
An |
... |
Additional arguments for the S3 method |
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).
summary.UndPCDs,
print.summary.UndPCDs,
and plot.UndPCDs
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)
NumEdges object
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.
## S3 method for class 'NumEdges' summary(object, ...)## S3 method for class 'NumEdges' summary(object, ...)
object |
An |
... |
Additional parameters for |
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.
print.NumEdges, print.summary.NumEdges,
and plot.NumEdges
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)
UndPCDs object
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)).
## S3 method for class 'UndPCDs' summary(object, ...)## S3 method for class 'UndPCDs' summary(object, ...)
object |
An |
... |
Additional parameters for |
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)).
print.UndPCDs, print.summary.UndPCDs,
and plot.UndPCDs
## Not run: 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) ## End(Not run)## Not run: 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) ## End(Not run)