Skip to main content

evaluate_sparse_b1_multilinear

Function evaluate_sparse_b1_multilinear 

Source
pub fn evaluate_sparse_b1_multilinear<E: FieldOps>(
    bits: &SparseBitVector,
    point: &[E],
) -> E
Expand description

Evaluates the multilinear extension of a bit vector at a point of bits.log_len() coordinates.

Σ_{k in set bits} eq(point, k)

The coordinates are split into contiguous chunks, each expanded once into an equality-indicator tensor, and each set bit contributes the product of one lookup per chunk. See evaluate_sparse_b1_multilinear_native for the faster path over a base field.

// Bits 1 and 2 of a length-4 vector, read back at the vertex of index 2.
let bits = SparseBitVector::new(2, vec![2, 1]);
let point = [B128::ZERO, B128::ONE];
assert_eq!(evaluate_sparse_b1_multilinear(&bits, &point), B128::ONE);

§Preconditions

  • point.len() must equal bits.log_len()