View source: R/ArcSliceFunctions.R
ASarc.dens.tri | R Documentation |
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).
ASarc.dens.tri(Xp, tri, M = "CC", tri.cor = FALSE)
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. |
tri.cor |
A logical argument for computing the arc density for only the points inside the triangle, |
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.
Elvan Ceyhan
ASarc.dens.tri
, CSarc.dens.tri
, and num.arcsAStri
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.