naginterfaces.library.interp.dim5_​scat_​shep

naginterfaces.library.interp.dim5_scat_shep(x, f, nw, nq)[source]

dim5_scat_shep generates a five-dimensional interpolant to a set of scattered data points, using a modified Shepard method.

For full information please refer to the NAG Library document for e01tm

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e01/e01tmf.html

Parameters
xfloat, array-like, shape

must be set to the Cartesian coordinates of the data point , for .

ffloat, array-like, shape

must be set to the data value , for .

nwint

The number of data points that determines each radius of influence , appearing in the definition of each of the weights , for (see Notes). Note that is different for each weight. If the default value is used instead.

nqint

The number of data points to be used in the least squares fit for coefficients defining the quadratic functions (see Notes). If the default value is used instead.

Returns
iqint, ndarray, shape

Integer data defining the interpolant .

rqfloat, ndarray, shape

Real data defining the interpolant .

Raises
NagValueError
(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: .

(errno )

There are duplicate nodes in the dataset. , for , and . The interpolant cannot be derived.

(errno )

On entry, all the data points lie on the same four-dimensional hypersurface. No unique solution exists.

Notes

dim5_scat_shep constructs a smooth function , which interpolates a set of scattered data points , for , using a modification of Shepard’s method. The surface is continuous and has continuous first partial derivatives.

The basic Shepard method, which is a generalization of the two-dimensional method described in Shepard (1968), interpolates the input data with the weighted mean

where , and .

The basic method is global in that the interpolated value at any point depends on all the data, but dim5_scat_shep uses a modification (see Franke and Nielson (1980) and Renka (1988a)), whereby the method becomes local by adjusting each to be zero outside a hypersphere with centre and some radius . Also, to improve the performance of the basic method, each above is replaced by a function , which is a quadratic fitted by weighted least squares to data local to and forced to interpolate . In this context, a point is defined to be local to another point if it lies within some distance of it.

The efficiency of dim5_scat_shep is enhanced by using a cell method for nearest neighbour searching due to Bentley and Friedman (1979) with a cell density of .

The radii and are chosen to be just large enough to include and data points, respectively, for user-supplied constants and . Default values of these arguments are provided, and advice on alternatives is given in Further Comments.

dim5_scat_shep is derived from the new implementation of QSHEP3 described by Renka (1988b). It uses the modification for five-dimensional interpolation described by Berry and Minser (1999).

Values of the interpolant generated by dim5_scat_shep, and its first partial derivatives, can subsequently be evaluated for points in the domain of the data by a call to dim5_scat_shep_eval().

References

Bentley, J L and Friedman, J H, 1979, Data structures for range searching, ACM Comput. Surv. (11), 397–409

Berry, M W, Minser, K S, 1999, Algorithm 798: high-dimensional interpolation using the modified Shepard method, ACM Trans. Math. Software (25), 353–366

Franke, R and Nielson, G, 1980, Smooth interpolation of large sets of scattered data, Internat. J. Num. Methods Engrg. (15), 1691–1704

Renka, R J, 1988, Multivariate interpolation of large sets of scattered data, ACM Trans. Math. Software (14), 139–148

Renka, R J, 1988, Algorithm 661: QSHEP3D: Quadratic Shepard method for trivariate interpolation of scattered data, ACM Trans. Math. Software (14), 151–152

Shepard, D, 1968, A two-dimensional interpolation function for irregularly spaced data, Proc. 23rd Nat. Conf. ACM, 517–523, Brandon/Systems Press Inc., Princeton