e01be computes a monotonicity-preserving piecewise cubic Hermite interpolant to a set of data points.
Syntax
C# |
---|
public static void e01be( int n, double[] x, double[] f, double[] d, out int ifail ) |
Visual Basic |
---|
Public Shared Sub e01be ( _ n As Integer, _ x As Double(), _ f As Double(), _ d As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void e01be( int n, array<double>^ x, array<double>^ f, array<double>^ d, [OutAttribute] int% ifail ) |
F# |
---|
static member e01be : n : int * x : float[] * f : float[] * d : float[] * ifail : int byref -> unit |
Parameters
- n
- Type: System..::..Int32On entry: , the number of data points.Constraint: .
- x
- Type: array<System..::..Double>[]()[][]An array of size [n]On entry: must be set to , the th value of the independent variable (abscissa), for .Constraint: .
- f
- Type: array<System..::..Double>[]()[][]An array of size [n]On entry: must be set to , the th value of the dependent variable (ordinate), for .
- d
- Type: array<System..::..Double>[]()[][]An array of size [n]On exit: estimates of derivatives at the data points. contains the derivative at .
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
e01be estimates 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 method is derived from method PCHIM in Fritsch (1982).
Values of the computed interpolant, and of its first derivative and definite integral, can subsequently be computed by calling e01bf (E01BGF not in this release) (E01BHF not in this release), as described in
[Further Comments].
References
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
Error Indicators and Warnings
Errors or warnings detected by the method:
On entry, .
- The values of , for , are not in strictly increasing order.
Accuracy
The computational errors in the array d should be negligible in most practical situations.
Parallelism and Performance
None.
Further Comments
The time taken by e01be is approximately proportional to .
The values of the computed interpolant at the points , for , may be obtained in the real array pf, of length at least m, by the call:
where n, x and f are the input parameters to e01be and
d is the output parameter from e01be.