NLA-lib Explorer

NLAlib.dividedDifference

Library · def

The divided difference of the values r_i at the nodes \mathbf{v}_i, i \in s: r[s] := \sum_{i \in s} w_i\,r_i with the nodal weights w_i = \prod_{j \ne i}(\mathbf{v}_i - \mathbf{v}_j)^{-1} (Lagrange.nodalWeight). For distinct nodes and \lvert s \rvert = q + 1 it is the coefficient of X^q of the interpolant (dividedDifference_eq_coeff_interpolate). Junk value: for repeated nodes the weights contain 0^{-1} = 0. [Higham2008, (1.10)]; locator to verify.

NLAlib.dividedDifference.{u_1, u_2} {F : Type u_1} [Field F] {ι : Type u_2} [DecidableEq ι]
  (s : Finset ι) (v r : ι → F) : F

Full source on GitHub

Import NLAlib.Polynomial.Interpolation.DividedDifference.