ASarc.dens.tri: Arc density of Arc Slice Proximity Catch Digraphs (AS-PCDs) -...

View source: R/ArcSliceFunctions.R

ASarc.dens.triR Documentation

Arc density of Arc Slice Proximity Catch Digraphs (AS-PCDs) - one triangle case

Description

Returns the arc density of AS-PCD whose vertex set is the given 2D numerical data set, Xp, (some of its members are) in the triangle tri.

AS proximity regions is defined with respect to tri and vertex regions are defined with the center M="CC" for circumcenter of tri; or M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri; default is M="CC" i.e., circumcenter of tri. For the number of arcs, loops are not allowed so arcs are only possible for points inside tri for this function.

tri.cor is a logical argument for triangle correction (default is TRUE), if TRUE, only the points inside the triangle are considered (i.e., digraph induced by these vertices are considered) in computing the arc density, otherwise all points are considered (for the number of vertices in the denominator of arc density).

See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).

Usage

ASarc.dens.tri(Xp, tri, M = "CC", tri.cor = FALSE)

Arguments

Xp

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

tri

Three 2D points, stacked row-wise, each row representing a vertex of the triangle.

M

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

tri.cor

A logical argument for computing the arc density for only the points inside the triangle, tri (default is tri.cor=FALSE), i.e., if tri.cor=TRUE only the induced digraph with the vertices inside tri are considered in the computation of arc density.

Value

Arc density of AS-PCD whose vertices are the 2D numerical data set, Xp; AS proximity regions are defined with respect to the triangle tri and CC-vertex regions.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

ASarc.dens.tri, CSarc.dens.tri, and num.arcsAStri

Examples

## Not run: 
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);

set.seed(1)
n<-10  #try also n<-20

Xp<-runif.tri(n,Tr)$g

M<-as.numeric(runif.tri(1,Tr)$g)  #try also M<-c(1.6,1.2)

num.arcsAStri(Xp,Tr,M)
ASarc.dens.tri(Xp,Tr,M)
ASarc.dens.tri(Xp,Tr,M,tri.cor = FALSE)

ASarc.dens.tri(Xp,Tr,M)

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.