Lagrange Interpolation #
This file defines computable Lagrange interpolation
for univariate polynomials, i.e. CPolynomials.
basisDivisor xᵢ xⱼ is the unique linear or constant computable polynomial such that
when evaluated at xᵢ it gives 1 and xⱼ it gives 0 (where when xᵢ = xⱼ it is
identically 0). Such polynomials are the building blocks for the Lagrange interpolants.
Instances For
Computable Lagrange basis polynomials indexed by s : Finset ι, defined at nodes x i for a
map x : ι → F. For i, j ∈ s, basis s x i evaluates to 0 at x j for i ≠ j. When
x is injective on s, basis s x i evaluates to 1 at x i.
Instances For
Computable Lagrange interpolation: given a finset s : Finset ι, a nodal map x : ι → F
injective on s and a value function y : ι → F, interpolate s x y is the unique computable
polynomial of degree < #s that takes value y i on x i for all i in s.
Instances For
Produces the unique polynomial of degree at most n-1 that equals r[i] at ω^i for i = 0, 1, ..., n-1.
Uses Lagrange interpolation: p(X) = Σᵢ rᵢ · Lᵢ(X) where Lᵢ(X) = ∏_{j≠i} (X - ωʲ) / (ωⁱ - ωʲ).