|
|
◆ pchid()
| double pchid |
( |
int |
n, |
|
|
double |
x[], |
|
|
double |
f[], |
|
|
double |
d[], |
|
|
int |
incfd, |
|
|
int |
skip, |
|
|
int |
ia, |
|
|
int |
ib, |
|
|
int * |
info |
|
) |
| |
Integral of piecewise cubic Hermite / cubic spline function (over an interval whose endpoints are data points)
- Purpose
- This routine evaluates the definite integral of a piecewise cubic Hermite function over an interval whose endpoints are data points. The interpolant is defined by n, x[], f[] and d[] computed by pchim, pchic, pchsp or pchse.
- Returns
- Value of the requested integral.
- Parameters
-
| [in] | n | Number of data points. (n >= 2) |
| [in] | x[] | Array x[lx] (lx >= n)
Independent variable values. The elements of x[] must be strictly increasing. |
| [in] | f[] | Array f[lf] (lf >= incfd*(n - 1) + 1)
Function values. f[i*incfd] is the value corresponding to x[i] (i = 0 to n - 1). |
| [in] | d[] | Array d[ld] (ld >= incfd*(n - 1) + 1)
Derivative values. d[i*incfd] is the value corresponding to x[i] (i = 0 to n - 1). |
| [in] | incfd | Increment between successive values in f[] and d[]. (incfd >= 1) |
| [in] | skip | Logical variable which should be set to true (1) if the user wishes to skip checks for validity of preceding parameters, or to false (0) otherwise. This will save time in case these checks have already been performed (say, in pchim, pchic, pchsp or pchse). |
| [in] | ia | Index in x[] for the lower limit of integration. (0 <= ia < ib <= n - 1) |
| [in] | ib | Index in x[] for the upper limit of integration. (0 <= ia < ib <= n - 1) |
| [out] | info | = 0: Successful exit
= -1: The argument n had an illegal value (n < 2)
= -2: The argument x had an illegal value (not distinct or not in increasing order)
= -5: The argument incfd had an illegal value (incfd < 1)
= -7: The argument ia had an illegal value (ia < 1 or ia > n)
= -8: The argument ib had an illegal value (ib < 1 or ib > n) |
- Reference
- SLATEC (PCHIP)
|