naginterfaces.library.fit.dim2_spline_derivm¶
- naginterfaces.library.fit.dim2_spline_derivm(x, y, lamda, mu, c, nux, nuy)[source]¶
dim2_spline_derivm
computes the partial derivative (of order , ), of a bicubic spline approximation to a set of data values, from its B-spline representation, at points on a rectangular grid in the - plane. This function may be used to calculate derivatives of a bicubic spline given in the form produced byinterp.dim2_spline_grid
,dim2_spline_panel()
,dim2_spline_grid()
anddim2_spline_sctr()
.For full information please refer to the NAG Library document for e02dh
https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/e02/e02dhf.html
- Parameters
- xfloat, array-like, shape
must be set to , the coordinate of the th grid point along the axis, for , on which values of the partial derivative are sought.
- yfloat, array-like, shape
must be set to , the coordinate of the th grid point along the axis, for on which values of the partial derivative are sought.
- lamdafloat, array-like, shape
Contains the position of the knots in the -direction of the bicubic spline approximation to be differentiated, e.g., as returned by
dim2_spline_grid()
.- mufloat, array-like, shape
Contains the position of the knots in the -direction of the bicubic spline approximation to be differentiated, e.g., as returned by
dim2_spline_grid()
.- cfloat, array-like, shape
The coefficients of the bicubic spline approximation to be differentiated, e.g., as returned by
dim2_spline_grid()
.- nuxint
Specifies the order, of the partial derivative in the -direction.
- nuyint
Specifies the order, of the partial derivative in the -direction.
- Returns
- zfloat, ndarray, shape
contains the derivative , for , for .
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, .
Constraint: .
- (errno )
On entry, for , and .
Constraint: , for .
- (errno )
On entry, for , and .
Constraint: , for .
- Notes
dim2_spline_derivm
determines the partial derivative of a smooth bicubic spline approximation at the set of data points .The spline is given in the B-spline representation
where and denote normalized cubic B-splines, the former defined on the knots to and the latter on the knots to , with and the total numbers of knots of the computed spline with respect to the and variables respectively. For further details, see Hayes and Halliday (1974) for bicubic splines and de Boor (1972) for normalized B-splines. This function is suitable for B-spline representations returned by
interp.dim2_spline_grid
,dim2_spline_panel()
,dim2_spline_grid()
anddim2_spline_sctr()
.The partial derivatives can be up to order in each direction; thus the highest mixed derivative available is .
The points in the grid are defined by coordinates , for , along the axis, and coordinates , for , along the axis.
- References
de Boor, C, 1972, On calculating with B-splines, J. Approx. Theory (6), 50–62
Dierckx, P, 1981, An improved algorithm for curve fitting with spline functions, Report TW54, Department of Computer Science, Katholieke Univerciteit Leuven
Dierckx, P, 1982, A fast algorithm for smoothing data on a rectangular grid while using spline functions, SIAM J. Numer. Anal. (19), 1286–1304
Hayes, J G and Halliday, J, 1974, The least squares fitting of cubic spline surfaces to general data sets, J. Inst. Math. Appl. (14), 89–103
Reinsch, C H, 1967, Smoothing by spline functions, Numer. Math. (10), 177–183