Search sorted data
kd_lower_bound(x, v) kd_upper_bound(x, v) kd_range_query(x, l, u) kd_rq_indices(x, l, u) kd_binary_search(x, v)
x | an object sorted by |
---|---|
v | a vector specifying where to look |
l | lower left corner of search region |
u | upper right corner of search region |
#> [,1] [,2] #> [1,] 0.02806097 0.004496308 #> [2,] 0.03424133 0.011479538 #> [3,] 0.03123033 0.164569248 #> [4,] 0.05861411 0.163623198 #> [5,] 0.18033877 0.044617158 #> (continues for 95 more rows)#> [1] 0.7328820 0.5117913#> [1] 0.7328820 0.5117913#> [1] FALSE#> [,1] [,2] #> [1,] 0.4035381 0.3589670 #> [2,] 0.3900314 0.4381372 #> [3,] 0.3357191 0.5813660 #> [4,] 0.3887013 0.5844753 #> [5,] 0.4007202 0.4848028 #> (continues for 9 more rows)#> [1] 19 20 21 23 24 25 58 59 60 61 62 63 77 80