Find the largest/maximal empty rectangle, i.e. with largest area, not containing given points.
maxempty(x, y, ax = c(0,1), ay = c(0,1))
Arguments
x, y: coordinates of points to be avoided.
ax, ay: left and right resp. lower and upper constraints.
Details
Find the largest or maximal empty two-dimensional rectangle in a rectangular area. The edges of this rectangle have to be parallel to the edges of the enclosing rectangle (and parallel to the coordinate axes). `Empty' means that none of the points given are contained in the interior of the found rectangle.
Returns
List with area and rect the rectangle as a vector usable for the rect graphics function.
Note
The algorithm has a run-time of O(n^2) while there are run-times of O(n*log(n)) reported in the literature, utilizing a more complex data structure. I don't know of any comparable algorithms for the largest empty circle problem.