The function may be called by the names: e01bfc, nag_interp_dim1_monotonic_eval or nag_monotonic_evaluate.
A piecewise cubic Hermite interpolant, as computed by e01bec, is evaluated at the points , for . If any point lies outside the interval from to , a value is extrapolated from the nearest extreme cubic, and a warning is returned.
Fritsch F N (1982) PCHIP final specifications Report UCID-30194 Lawrence Livermore National Laboratory
1: – IntegerInput
On entry: n must be unchanged
from the previous call of e01bec.
2: – const doubleInput
3: – const doubleInput
4: – const doubleInput
On entry: x, f and d must be unchanged from the previous call of e01bec.
5: – IntegerInput
On entry: , the number of points at which the interpolant is to be evaluated.
6: – const doubleInput
On entry: the values of at which the interpolant is to be evaluated.
7: – doubleOutput
On exit: contains the value of the interpolant evaluated at the point , for .
8: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
On entry, .
On entry, .
On entry, for : , .
The values of , for , are not in strictly increasing order.
Warning – some points in array PX lie outside the range . Values at these points are unreliable as they have been computed by extrapolation.
The computational errors in the array pf should be negligible in most practical situations.
8Parallelism and Performance
e01bfc is not threaded in any implementation.
The time taken by e01bfc is approximately proportional to the number of evaluation points, . The evaluation will be most efficient if the elements of px are in nondecreasing order (or, more generally, if they are grouped in increasing order of the intervals ). A single call of e01bfc with is more efficient than several calls with .
This example program reads in values of n, x, f, d and m, and then calls e01bfc to evaluate the interpolant at equally spaced points.