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 are defined with respect to tri
and vertex regions are defined with the center M="CC"
for circumcenter of tri
;
or M=(m_1,m_2)
in Cartesian coordinates or M=(\alpha,\beta,\gamma)
in barycentric coordinates in the
interior of the triangle tri
; default is M="CC"
i.e., circumcenter of tri
.
For the number of arcs, loops are not allowed so arcs 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
, arc density is computed only for
the points inside the triangle (i.e., arc density of the subdigraph
induced by the vertices in the triangle is computed),
otherwise arc density of the entire digraph (i.e., digraph with all the vertices) is computed.
See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010,ceyhan:mcap2012;textualpcds).
ASarc.dens.tri(Xp, tri, M = "CC", in.tri.only = 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. |
in.tri.only |
A logical argument (default is |
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
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)
narcs = num.arcsAStri(Xp,Tr,M)$num.arcs; narcs/(n*(n-1))
ASarc.dens.tri(Xp,Tr,M)
ASarc.dens.tri(Xp,Tr,M,in.tri.only = FALSE)
ASarc.dens.tri(Xp,Tr,M)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.