Return a function performing the linear interpolation.
linfun(x, y, yleft = y[1], yright = y[length(y)])
Objet of class linfun
and function
which is an approxfun
function with method = 'linear'
.
A C++ version of this function is available. See vignette('IBMPopSim_cpp')
for more details.