pub fn barycentric_weights<F: Field>(x_coords: &[F]) -> Option<Vec<F>>Expand description
Computes barycentric weights w_i = 1 / prod_{j != i} (x_i - x_j).
These weights depend only on the domain points, not on polynomial values. Precompute them once and reuse across many evaluation targets.
§Performance
- n(n-1)/2 field subtractions (upper-triangle symmetry trick).
- One batch inversion via Montgomery’s trick.
§Returns
None if any two domain points coincide.