- naginterfaces.library.interp.dim1_monotonic(x, f)¶
dim1_monotoniccomputes a monotonicity-preserving piecewise cubic Hermite interpolant to a set of data points.
For full information please refer to the NAG Library document for e01be
- xfloat, array-like, shape
must be set to , the th value of the independent variable (abscissa), for .
- ffloat, array-like, shape
must be set to , the th value of the dependent variable (ordinate), for .
- dfloat, ndarray, shape
Estimates of derivatives at the data points. contains the derivative at .
- (errno )
On entry, .
- (errno )
On entry, , and .
Constraint: for all .
In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.
dim1_monotonicestimates first derivatives at the set of data points , for , which determine a piecewise cubic Hermite interpolant to the data, that preserves monotonicity over ranges where the data points are monotonic. If the data points are only piecewise monotonic, the interpolant will have an extremum at each point where monotonicity switches direction. The estimates of the derivatives are computed by a formula due to Brodlie, which is described in Fritsch and Butland (1984), with suitable changes at the boundary points.
The function is derived from function PCHIM in Fritsch (1982).
Values of the computed interpolant, and of its first derivative and definite integral, can subsequently be computed by calling
dim1_monotonic_intg(), as described in Further Comments.
Fritsch, F N, 1982, PCHIP final specifications, Report UCID-30194, Lawrence Livermore National Laboratory
Fritsch, F N and Butland, J, 1984, A method for constructing local monotone piecewise cubic interpolants, SIAM J. Sci. Statist. Comput. (5), 300–304