|
|
◆ Interv()
| Sub Interv |
( |
Xt() As |
Double, |
|
|
Lxt As |
Long, |
|
|
X As |
Double, |
|
|
Ilo As |
Long, |
|
|
Ileft As |
Long, |
|
|
Info As |
Long |
|
) |
| |
Compute Ileft for the input to Bsplvd and Bsplvn
- Purpose
- This routine computes the largest integer Ileft in 1 <= Ileft <= Lxt such that Xt(Ileft-1) <= X where Xt() is a subdivision of the X interval. Precisely, the following values will be returned.
If X < Xt(0) then Ileft = 1, Info = 2
If Xt(i-1] <= X < Xt(i) then Ileft = i, Info = 0
If Xt(Lxt-1] <= X then Ileft = Lxt, Info = 1
When multiplicities are present in the break point to the left of X, the largest index is taken for Ileft.
- Parameters
-
| [in] | Xt() | Array Xt(LXt - 1)
Knot or break point vector. |
| [in] | Lxt | Length of the vector Xt(). (Lxt >= 1) |
| [in] | X | Argument X. |
| [in,out] | Ilo | Initialization parameter.
[in] Must be set to 1 the first time the array Xt() is processed by Interv.
[out] Information for efficient processing after the initial call and Ilo must not be changed by the user. Distinct splines require distinct Ilo parameters. |
| [out] | Ileft | Largest integer satisfying Xt(Ileft-1) <= X. |
| [out] | Info | = 0: Successful exit.
= -1: The argument Xt() is invalid.
= -2: The argument Lxt had an illegal value. (Lxt < 1)
= 1: X lies out of bounds. (Xt(Lxt-1) <= X)
= 2: X lies out of bounds. (X < Xt(0)) |
- Reference
- SLATEC
- Example Program
- See example of Bsplvn and Bsplvd.
|