|
|
◆ chfdv()
| void chfdv |
( |
double |
x1, |
|
|
double |
x2, |
|
|
double |
f1, |
|
|
double |
f2, |
|
|
double |
d1, |
|
|
double |
d2, |
|
|
int |
ne, |
|
|
double |
xe[], |
|
|
double |
fe[], |
|
|
double |
de[], |
|
|
int |
next[], |
|
|
int * |
info |
|
) |
| |
Cubic Hermite function and derivative values
- Purpose
- This routine evaluates a cubic polynomial given in Hermite form and its first derivative at an array of points, i.e. evaluates the cubic polynomial determined by function values f1, f2 and derivatives d1, d2 on interval [x1, x2], together with its first derivative, at the points xe[j], j = 1 to ne.
While designed for use by pchfd, it may be useful directly as an evaluator for a piecewise cubic Hermite function in applications, such as graphing, where the interval is known in advance.
If only function values are required, use chfev instead.
- Parameters
-
| [in] | x1 | Endpoint of interval of definition of cubic. (x1 != x2) |
| [in] | x2 | Endpoint of interval of definition of cubic. (x1 != x2) |
| [in] | f1 | Value of function at x1. |
| [in] | f2 | Value of function at x2. |
| [in] | d1 | Value of derivative at x1. |
| [in] | d2 | Value of derivative at x2. |
| [in] | ne | Number of evaluation points. (ne >= 1) |
| [in] | xe[] | Array xe[lxe] (lxe >= ne)
Points at which the function is to be evaluated. If any of the xe are outside the interval [x1, x2], a warning error is returned in next[]. |
| [out] | fe[] | Array fe[lfe] (lfe >= ne)
Values of the cubic function defined by x1, x2, f1, f2, d1, d2 at the points xe[]. |
| [out] | de[] | Array de[lde] (lde >= ne)
Values of the first derivative of the cubic function defined by x1, x2, f1, f2, d1, d2 at the points xe[]. |
| [out] | next[] | Array next[2]
Number of extrapolation points.
next[0] = number of evaluation points to left of interval
next[1] = number of evaluation points to right of interval |
| [out] | info | = 0: Successful exit
= -2: The argument x2 had an illegal value (x2 = x1)
= -7: The argument ne had an illegal value (ne < 1) |
- Reference
- SLATEC (PCHIP)
|