|
FILTLAN 1.0a
|
Functions | |
| Vector | NewtonPolynomial (const Vector &x, const Vector &y) |
| Build a polynomial P(z) by Newton's divided differences and return the coefficient vector a. | |
| Real | NewtonPolynomialEvaluation (const Vector &a, const Vector &x, const Real z0) |
| Evaluate P(z0), i.e. the value of P(z) at z=z0, where P(z) is a Newton polynomial defined by a and x. | |
| Vector NewtonPolynomial | ( | const Vector & | x, |
| const Vector & | y | ||
| ) |
Build a polynomial P(z) by Newton's divided differences and return the coefficient vector a.
A Newton polynomial is in the form P(z) = a(1) + a(2)*(z-x(1)) + a(3)*(z-x(1))*(z-x(2)) + ... + a(n)*(z-x(1))*...*(z-x(n-1)), such that P(x(i)) = y(i) for i=1,...,n.
| x | is the input vector of the domain values. |
| y | is the input vector of the range values. |
All vectors a, x, and y are of the same length n.
j, then it is assumed that the derivative of P(z) is to be zero at x(i) and the Hermite polynomial interpolation is applied. | Real NewtonPolynomialEvaluation | ( | const Vector & | a, |
| const Vector & | x, | ||
| const Real | z0 | ||
| ) |
Evaluate P(z0), i.e. the value of P(z) at z=z0, where P(z) is a Newton polynomial defined by a and x.
The newton polynomial is P(z) = a(1) + a(2)*(z-x(1)) + a(3)*(z-x(1))*(z-x(2)) + ... + a(n)*(z-x(1))*...*(z-x(n-1)).
1.7.3