Function evaluate_inplace

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

Evaluates a multilinear polynomial at a given point, modifying the buffer in-place.

This method computes the evaluation of a multilinear polynomial specified by it’s evaluations on the boolean hypercube. For an $n$-variate multilinear, this implementation performs $2^n - 1$ field multiplications and allocates no additional memory. The evals buffer is modified in-place.

§Arguments

  • evals - A FieldBuffer containing the $2^n$ evaluations over the boolean hypercube
  • coords - The $n$ coordinates at which to evaluate the polynomial

§Returns

The evaluation of the multilinear polynomial at the given point