Idom.num2PEtetra | R Documentation |
Returns I(
{p1,p2
} is a dominating set of the PE-PCD)
where the vertices of the PE-PCD are the 3D data set Xp
in the tetrahedron th
, that is,
returns 1 if {p1,p2
} is a dominating set of PE-PCD, returns 0 otherwise.
Point, p1
, is in the region of vertex rv1
(default is NULL
) and point, p2
, is in the region of vertex rv2
(default is NULL
); vertices (and hence rv1
and rv2
) are labeled as 1,2,3,4
in the order they are stacked
row-wise in th
.
PE proximity region is constructed with respect to the tetrahedron th
with expansion parameter r \ge 1
and vertex regions are based on center of mass (M="CM"
) or circumcenter (M="CC"
) only.
ch.data.pnts
is for checking whether points p1
and p2
are both data points in Xp
or not (default is FALSE
),
so by default this function checks whether the points p1
and p2
would constitute a dominating set
if they actually were both in the data set.
See also (\insertCiteceyhan:Phd-thesis,ceyhan:comp-geo-2010;textualpcds).
Idom.num2PEtetra(
p1,
p2,
Xp,
th,
r,
M = "CM",
rv1 = NULL,
rv2 = NULL,
ch.data.pnts = FALSE
)
p1 , p2 |
Two 3D points to be tested for constituting a dominating set of the PE-PCD. |
Xp |
A set of 3D points which constitutes the vertices of the PE-PCD. |
th |
A |
r |
A positive real number which serves as the expansion parameter in PE proximity region;
must be |
M |
The center to be used in the construction of the vertex regions in the tetrahedron, |
rv1 , rv2 |
The indices of the vertices whose regions contains |
ch.data.pnts |
A logical argument for checking whether both points |
I(
{p1,p2
} is a dominating set of the PE-PCD)
where the vertices of the PE-PCD are the 3D data set Xp
),
that is, returns 1 if {p1,p2
} is a dominating set of PE-PCD, returns 0 otherwise
Elvan Ceyhan
Idom.num2PEstd.tetra
, Idom.num2PEtri
and Idom.num2PEbasic.tri
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<-5
set.seed(1)
Xp<-runif.tetra(n,tetra)$g #try also Xp<-cbind(runif(n),runif(n),runif(n))
M<-"CM"; #try also M<-"CC";
r<-1.5
Idom.num2PEtetra(Xp[1,],Xp[2,],Xp,tetra,r,M)
Idom.num2PEtetra(c(-1,-1,-1),Xp[2,],Xp,tetra,r,M)
ind.gam2<-ind.gamn2<-vector()
for (i in 1:(n-1))
for (j in (i+1):n)
{if (Idom.num2PEtetra(Xp[i,],Xp[j,],Xp,tetra,r,M)==1)
{ind.gam2<-rbind(ind.gam2,c(i,j))
}
}
ind.gam2
#or try
rv1<-rel.vert.tetraCC(Xp[1,],tetra)$rv;rv2<-rel.vert.tetraCC(Xp[2,],tetra)$rv
Idom.num2PEtetra(Xp[1,],Xp[2,],Xp,tetra,r,M,rv1,rv2)
#or try
rv1<-rel.vert.tetraCC(Xp[1,],tetra)$rv;
Idom.num2PEtetra(Xp[1,],Xp[2,],Xp,tetra,r,M,rv1)
#or try
rv2<-rel.vert.tetraCC(Xp[2,],tetra)$rv
Idom.num2PEtetra(Xp[1,],Xp[2,],Xp,tetra,r,M,rv2=rv2)
P1<-c(.1,.1,.1)
P2<-c(.4,.1,.2)
Idom.num2PEtetra(P1,P2,Xp,tetra,r,M)
Idom.num2PEtetra(c(-1,-1,-1),Xp[2,],Xp,tetra,r,M,ch.data.pnts = FALSE)
#gives an error message if ch.data.pnts = TRUE
#since not both points, p1 and p2, are data points in Xp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.