pub fn extrapolate_over_subspace<F: BinaryField, E: FieldOps + From<F>>(
subspace: &BinarySubspace<F>,
values: &[E],
z: E,
) -> EExpand description
Extrapolate a polynomial from its evaluations over a binary subspace to a point.
Given evaluations of a polynomial on all points of a binary subspace, computes the polynomial’s
value at an arbitrary point z using Lagrange interpolation. This is equivalent to computing
the inner product of values with the Lagrange basis evaluations at z, but avoids
materializing the full vector of Lagrange evaluations.
§Algorithm
Exploits the additive group structure of binary subspaces: all barycentric weights are
identical, so a single weight w = (∏_{j=1}^{n-1} domain[j])^{-1} is computed once. The
interpolated value is then w * Σ_i values[i] * ∏_{j≠i} (z - domain[j]), evaluated via a
single linear pass using a prefix-product accumulator (same technique as
EvaluationDomain::extrapolate).
§Complexity
- Time: O(n) where n = subspace size
- Space: O(1) beyond the input