mlappx.real {latentcor} | R Documentation |
Multilinear interpolation on a grid
Description
Multilinear interpolation on an arbitrary Cartesian product.
Usage
mlappx.real(val, grid, ...)
Arguments
val |
Array or function. Function values on a grid, or the function
itself. If it is the values, the |
grid |
A list. Each element is a vector of ordered grid-points for a dimension. These need not be Chebyshev-knots, nor evenly spaced. |
... |
Further arguments to the function, if |
Details
A call fun <- mlappx(val,grid)
creates a multilinear interpolant on
the grid. The value on the grid points will be exact, the value between the
grid points is a convex combination of the values in the corners of the
hypercube surrounding it.
If val
is a function it will be evaluated on the grid.
Value
A function(x)
defined on the hypercube, approximating the
given function. The function yields values for arguments outside the
hypercube as well, as a linear extension.