fr2vertsCCvert.reg.basic.tri: The furthest points from vertices in each CC-vertex region in...

View source: R/AuxExtrema.R View source: R/AuxExtrema.R

fr2vertsCCvert.reg.basic.triR Documentation

The furthest points from vertices in each CC-vertex region in a standard basic triangle

Description

An object of class "Extrema". Returns the furthest data points among the data set, Xp, in each CC-vertex region from the corresponding vertex in the standard basic triangle T_b=T(A=(0,0),B=(1,0),C=(c_1,c_2)).

Any given triangle can be mapped to the standard basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

ch.all.intri is for checking whether all data points are inside T_b (default is FALSE).

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

An object of class "Extrema". Returns the k furthest data points among the data set, Xp, in each CC-vertex region from the vertex in the standard basic triangle T_b=T(A=(0,0),B=(1,0),C=(c_1,c_2)).

Any given triangle can be mapped to the standard basic triangle by a combination of rigid body motions (i.e., translation, rotation and reflection) and scaling, preserving uniformity of the points in the original triangle. Hence, standard basic triangle is useful for simulation studies under the uniformity hypothesis.

ch.all.intri is for checking whether all data points are inside T_b (default is FALSE). In the extrema, ext, in the output, the first k entries are the k furthest points from vertex 1, second k entries are k furthest points are from vertex 2, and last k entries are the k furthest points from vertex 3 If data size does not allow, NA's are inserted for some or all of the k furthest points for each vertex.

Usage

fr2vertsCCvert.reg.basic.tri(Xp, c1, c2, k, ch.all.intri = FALSE)

fr2vertsCCvert.reg.basic.tri(Xp, c1, c2, k, ch.all.intri = FALSE)

Arguments

Xp

A set of 2D points representing the set of data points.

c1, c2

Positive real numbers which constitute the vertex of the standard basic triangle. adjacent to the shorter edges; c_1 must be in [0,1/2], c_2>0 and (1-c_1)^2+c_2^2 \le 1

k

A positive integer. k furthest data points in each CC-vertex region are to be found if exists, else NA are provided for (some of) the k furthest points.

ch.all.intri

A logical argument for checking whether all data points are inside T_b (default is FALSE).

Value

A list with the elements

txt1

Vertex labels are A=1, B=2, and C=3 (correspond to row number in Extremum Points).

txt2

A short description of the distances as "Distances from furthest points to ...".

type

Type of the extrema points

desc

A short description of the extrema points

mtitle

The "main" title for the plot of the extrema

ext

The extrema points, here, furthest points from vertices in each vertex region.

X

The input data, Xp, can be a matrix or data frame

num.points

The number of data points, i.e., size of Xp

supp

Support of the data points, here, it is T_b.

cent

The center point used for construction of edge regions.

ncent

Name of the center, cent, it is circumcenter "CC" for this function.

regions

Vertex regions inside the triangle, T_b, provided as a list.

region.names

Names of the vertex regions as "vr=1", "vr=2", and "vr=3"

region.centers

Centers of mass of the vertex regions inside T_b.

dist2ref

Distances from furthest points in each vertex region to the corresponding vertex.

A list with the elements

txt1

Vertex labels are A=1, B=2, and C=3 (correspond to row number in Extremum Points).

txt2

A shorter description of the distances as "Distances of k furthest points in the vertex regions to Vertices".

type

Type of the extrema points

desc

A short description of the extrema points

mtitle

The "main" title for the plot of the extrema

ext

The extrema points, here, k furthest points from vertices in each vertex region.

X

The input data, Xp, can be a matrix or data frame

num.points

The number of data points, i.e., size of Xp

supp

Support of the data points, here, it is T_b.

cent

The center point used for construction of edge regions.

ncent

Name of the center, cent, it is circumcenter "CC" for this function.

regions

Vertex regions inside the triangle, T_b, provided as a list.

region.names

Names of the vertex regions as "vr=1", "vr=2", and "vr=3"

region.centers

Centers of mass of the vertex regions inside T_b.

dist2ref

Distances from k furthest points in each vertex region to the corresponding vertex (each row representing a vertex).

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

fr2vertsCCvert.reg, fr2edgesCMedge.reg.std.tri, and kfr2vertsCCvert.reg

fr2vertsCCvert.reg.basic.tri, fr2vertsCCvert.reg, fr2edgesCMedge.reg.std.tri, and kfr2vertsCCvert.reg

Examples

## Not run: 
c1<-.4; c2<-.6;
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C)
n<-20

set.seed(1)
Xp<-runif.basic.tri(n,c1,c2)$g

Ext<-fr2vertsCCvert.reg.basic.tri(Xp,c1,c2)
Ext
summary(Ext)
plot(Ext)

f2v<-Ext

CC<-circumcenter.basic.tri(c1,c2)  #the circumcenter
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)

Xlim<-range(Tb[,1],Xp[,1])
Ylim<-range(Tb[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

plot(A,pch=".",asp=1,xlab="",ylab="",
main="Furthest Points in CC-Vertex Regions \n from the Vertices",
xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tb)
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(Xp)
points(rbind(f2v$ext),pch=4,col=2)

txt<-rbind(Tb,CC,D1,D2,D3)
xc<-txt[,1]+c(-.03,.03,0.02,.07,.06,-.05,.01)
yc<-txt[,2]+c(.02,.02,.03,.01,.02,.02,-.04)
txt.str<-c("A","B","C","CC","D1","D2","D3")
text(xc,yc,txt.str)

## End(Not run)

## Not run: 
c1<-.4; c2<-.6;
A<-c(0,0); B<-c(1,0); C<-c(c1,c2);
Tb<-rbind(A,B,C)
n<-20
k<-3

set.seed(1)
Xp<-runif.basic.tri(n,c1,c2)$g

Ext<-fr2vertsCCvert.reg.basic.tri(Xp,c1,c2,k)
Ext
summary(Ext)
plot(Ext)

kf2v<-Ext

CC<-circumcenter.basic.tri(c1,c2)  #the circumcenter
D1<-(B+C)/2; D2<-(A+C)/2; D3<-(A+B)/2;
Ds<-rbind(D1,D2,D3)

Xlim<-range(Tb[,1],Xp[,1])
Ylim<-range(Tb[,2],Xp[,2])
xd<-Xlim[2]-Xlim[1]
yd<-Ylim[2]-Ylim[1]

plot(A,pch=".",asp=1,xlab="",ylab="",
main=paste(k," Furthest Points in CC-Vertex Regions \n from the Vertices",sep=""),
xlim=Xlim+xd*c(-.05,.05),ylim=Ylim+yd*c(-.05,.05))
polygon(Tb)
L<-matrix(rep(CC,3),ncol=2,byrow=TRUE); R<-Ds
segments(L[,1], L[,2], R[,1], R[,2], lty=2)
points(Xp)
points(kf2v$ext,pch=4,col=2)

txt<-rbind(Tb,CC,Ds)
xc<-txt[,1]+c(-.03,.03,.02,.07,.06,-.05,.01)
yc<-txt[,2]+c(.02,.02,.03,-.02,.02,.03,-.04)
txt.str<-c("A","B","C","CC","D1","D2","D3")
text(xc,yc,txt.str)

## End(Not run)


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