Returns the Lagrange basis set of polynomials associated with a set of
points. This is the set of polynomials each of which is
1 at its
corresponding point in the input list and
0 at all others.
These polynomials are especially convenient, mathematically, for
interpolation. The interpolating polynomial for a set of points
is given by using the
ys as coefficients for the basis given by
lagrangeBasis xs. Computationally, this is not an especially stable
implements a slightly better algorithm based on the same idea.
Generally it is better to not compute the coefficients at all.
Math.Polynomial.Interpolation.polyInterp evaluates the interpolating
polynomial directly, and is both quicker and more stable than any method
I know of that computes the coefficients.
Construct the Lagrange master polynomial for the Lagrange barycentric form: That is, the monic polynomial with a root at each point in the input list.