MSdPolyInt
Routine
-
double MSdPolyInt (double x, const double xa[], const double ya[], int N,
double buff[])
Purpose
-
Polynomial interpolation given a set of points
Description
Given a set of points (xa and ya values), this routine evaluates the
polynomial passing through those points. The calculation uses
Neville's algorithm.
W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery,
"Numerical Recipes in C", 2nd Ed., Cambridge University Press, 1992.
P. Burger, D. Gillies, "Interactive Computer Graphics", Addison-Wesley,
1989.
The computational complexity is proportional to N^2. If the same polynomial
is to be evaluated at several points, other schemes which pre-compute a set
of coefficients for the polynomial may be preferable.
Parameters
-
<- double MSdPolyInt
-
Value of the polynomial evaluated at x
-
-> double x
-
Evaluation point
-
-> const double xa[]
-
Array of N abscissa values
-
-> const double ya[]
-
Array of N ordinate values
-
-> int N
-
Number of reference points
-
-> double buff[]
-
Buffer (2N values) for use internally. If buff is set to NULL,
a temporary buffer will be created internally.
Author / revision
P. Kabal
/ Revision 1.3 2003/05/09
Main Index libtsp