| poleInaccessibility {hutilscpp} | R Documentation | 
Find a binary pole of inaccessibility
Description
Find a binary pole of inaccessibility
Usage
poleInaccessibility2(
  x = NULL,
  y = NULL,
  DT = NULL,
  x_range = NULL,
  y_range = NULL,
  copy_DT = TRUE
)
poleInaccessibility3(
  x = NULL,
  y = NULL,
  DT = NULL,
  x_range = NULL,
  y_range = NULL,
  copy_DT = TRUE,
  test_both = TRUE
)
Arguments
x, y | 
 Coordinates.  | 
DT | 
 A   | 
x_range, y_range | 
 Numeric vectors of length-2; the range of   | 
copy_DT | 
 (logical, default:   | 
test_both | 
 (logical, default:   | 
Value
poleInaccessibility2- 
A named vector containing the
xmin,xmaxandymin,ymaxcoordinates of the largest rectangle of width an integer power of two that is empty. poleInaccessibility3- 
Starting with the rectangle formed by
poleInaccessibility2, the rectangle formed by stretching it out vertically and horizontally until the edges intersect the pointsx,y 
Examples
library(data.table)
library(hutils)
# A square with a 10 by 10 square of the northeast corner removed
x <- runif(1e4, 0, 100)
y <- runif(1e4, 0, 100)
DT <- data.table(x, y)
# remove the NE corner
DT_NE <- DT[implies(x > 90, y < 89)]
DT_NE[, poleInaccessibility2(x, y)]
DT_NE[, poleInaccessibility3(x, y)]