Contract the grid if the evaluation points exceed some threshold. This removes the corresponding z values. We can add points back to achieve the same (approximate) length.
contract_grid(z, Fz, lower, upper, add_back = TRUE, monotone = TRUE)
a list containing the grid points z
and the (interpolated) function
Fz
at those points
grid points (ordered)
function evaluated at those grid points
lower threshold at which to check Fz
upper threshold at which to check Fz
logical; if true, expand the grid to (about) the original size
logical; if true, enforce monotonicity on the expanded grid