
Last chance! 50% off unlimited learning
Sale ends in
This function calculates the complement of the
complement(x, y = NULL, alpha)
The x
and y
arguments provide the x
and y
coordinates of a set of points. Alternatively, a single argument x
can be provided, see Details.
Value of
Output matrix. For each row i
, compl[i,]
contains the information relative to an open ball or halfplane of the complement of the
An attempt is made to interpret the arguments x and y in a way suitable for computing the xy.coords
.
If y
is NULL and x
is an object of class "delvor"
, then the complement of the delvor
(it reduces the computational cost).
The complement of the delvor
. The function complement
returns a matrix compl
. For each row i
, compl[i,]
contains the information relative to an open ball or halfplane of the complement. The first three columns are assigned to the characterization of the ball or halfplane i
. The information relative to the edge of the Delaunay triangulation that generates the ball or halfplane i
is contained in compl[i,4:16]
. Thus, if the row i
refers to an open ball, compl[i,1:3]
contains the center and radius of the ball. Furthermore, compl[i,17:18]
and compl[i,19]
refer to the unitary vector i
. If the row i
refers to a halfplane, compl[i,1:3]
determines its equation. For the halfplane compl[i,1:3]=(a,b,-1)
. In the same way, for the halfplane compl[i,1:3]=(a,b,-2)
, for the halfplane compl[i,1:3]=(a,0,-3)
and for the halfplane compl[i,1:3]=(a,0,-4)
.
Edelsbrunner, H., Kirkpatrick, D.G. and Seidel, R. (1983) On the shape of a set of points in the plane. IEEE Transactions on Information Theory, 29(4), pp.551-559.
# NOT RUN {
# Random sample in the unit square
x <- matrix(runif(100), nc = 2)
# Value of alpha
alpha <- 0.2
# Complement of the alpha-convex hull
compl <- complement(x, alpha = alpha)
# }
Run the code above in your browser using DataLab