[R] Find a rectangle of maximal area
jim at bitwrit.com.au
Tue Mar 23 04:28:15 CET 2010
On 03/23/2010 10:23 AM, Ray Brownrigg wrote:
> How about less than 2 seconds? [And 500 points in less than 15 seconds - on a 2-year-old
> DELL Optiplex GX755.]
> The implementation below (at end) loops over all 'feasible' pairs of x values, then
> selects the largest rectangle for each pair, subject to your specified constraints. I
> have no idea if it implements a previously published algorithm.
> Other constraints are reasonably easily accommodated.
This is brilliant! May I use this algorithm, attributed to you of
course, to improve the emptyspace function?
More information about the R-help