Skip to main content

fold_highest_var

Function fold_highest_var 

Source
pub fn fold_highest_var<A: Allocator, P: PackedField, Data: Deref<Target = [P]>>(
    alloc: &A,
    values: &FieldBuffer<P, Data>,
    scalar: P::Scalar,
) -> FieldVec<P, A>
Expand description

Fixes the highest variable of a multilinear to a value, writing into memory from an allocator.

g(X_0, ..., X_{n-2}) = f(X_0, ..., X_{n-2}, r)

Each output coefficient interpolates the line through one pair of input coefficients. The input is left untouched.

Use this when the input is borrowed or must be preserved. Otherwise prefer the form that overwrites the input.

ยงPreconditions

  • the buffer must have at least one variable