mlappx.real: Multilinear interpolation on a grid

View source: R/multilinear.R

mlappx.realR 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 dim-attribute must be appropriately set.

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 is.function(val).

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.


latentcor documentation built on Sept. 6, 2022, 1:06 a.m.