The routine may be called by the names e01bff or nagf_interp_dim1_monotonic_eval.
e01bff evaluates a piecewise cubic Hermite interpolant, as computed by e01bef, 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
2: – Real (Kind=nag_wp) arrayInput
3: – Real (Kind=nag_wp) arrayInput
4: – Real (Kind=nag_wp) arrayInput
On entry: n, x, f and d must be unchanged from the previous call of e01bef.
5: – IntegerInput
On entry: , the number of points at which the interpolant is to be evaluated. If any point lies outside the interval from ) to , a value is extrapolated from the nearest extreme cubic, and a warning is returned. The extrapolation simply extends the final cubic at each end.
6: – Real (Kind=nag_wp) arrayInput
On entry: the values of at which the interpolant is to be evaluated.
7: – Real (Kind=nag_wp) arrayOutput
On exit: contains the value of the interpolant evaluated at the point , for .
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, .
On entry, , and .
Constraint: for all .
On entry, .
Warning – some points in array px lie outside the range . Values at these points are unreliable because computed by extrapolation.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
The computational errors in the array pf should be negligible in most practical situations.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
e01bff is not threaded in any implementation.
The time taken by e01bff 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
e01bff with is more efficient than several calls with .
As documented above, this routine will use extrapolation if presented with evaluation points outside the region . Since such extrapolated values are computed simply by extending the cubic approximation at each end interval, the values may not be suitable for all purposes. If you need more control over how values outside the original region are calculated, consider the following possible procedures for degree , and extrapolation.