Learn R Programming

pcds (version 0.1.6)

NumArcsPEtetra: Number of arcs of Proportional Edge Proximity Catch Digraphs (PE-PCDs) - one tetrahedron case

Description

Returns the number of arcs of Proportional Edge Proximity Catch Digraphs (PE-PCDs) whose vertices are the given 3D numerical data set, Xp. It also provides number of vertices (i.e., number of data points inside the tetrahedron) and indices of the data points that reside in the tetrahedron.

PE proximity region is constructed with respect to the tetrahedron th and vertex regions are based on the center M which is circumcenter ("CC") or center of mass ("CM") of th with default="CM". For the number of arcs, loops are not allowed so arcs are only possible for points inside the tetrahedron th for this function.

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

Usage

NumArcsPEtetra(Xp, th, r, M = "CM")

Value

A list with the elements

num.arcs

Number of arcs of the PE-PCD

num.in.tetra

Number of Xp points in the tetrahedron, th

ind.in.tetra

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

Arguments

Xp

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

th

A \(4 \times 3\) matrix with each row representing a vertex of the tetrahedron.

r

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

M

The center to be used in the construction of the vertex regions in the tetrahedron, th. Currently it only takes "CC" for circumcenter and "CM" for center of mass; default="CM".

Author

Elvan Ceyhan

References

See Also

NumArcsPEtri, NumArcsCStri, and NumArcsAStri

Examples

Run this code
if (FALSE) {
A<-c(0,0,0); B<-c(1,0,0); C<-c(1/2,sqrt(3)/2,0); D<-c(1/2,sqrt(3)/6,sqrt(6)/3)
tetra<-rbind(A,B,C,D)

n<-10  #try also n<-20
set.seed(1)
Xp<-runif.tetra(n,tetra)$g

M<-"CM"  #try also M<-"CC"
r<-1.25

NumArcsPEtetra(Xp,tetra,r,M)
NumArcsPEtetra(Xp,tetra,r=1.5,M)
}

Run the code above in your browser using DataLab