Skip to main content

evaluate_inplace

Function evaluate_inplace 

Source
pub fn evaluate_inplace<F, P, Data>(
    evals: FieldBuffer<P, Data>,
    coords: &[F],
) -> F
where F: Field, P: PackedField<Scalar = F>, Data: BufferData<P>,
Expand description

Evaluates a multilinear polynomial at a point, consuming the coefficients.

One variable is fixed at a time, in place, so nothing beyond the buffer is allocated. Each fold halves the buffer, and the last one leaves the single result.

ยงPreconditions

  • the point must hold one coordinate per variable of the polynomial