Skip to main content

expand_libra_eval

Function expand_libra_eval 

Source
pub fn expand_libra_eval<A: Allocator, P: PackedField>(
    alloc: &A,
    challenge_point: &[P::Scalar],
    n_vars: usize,
    degree: usize,
    m_n: usize,
    m_d: usize,
) -> FieldVec<P, A>
Expand description

Generates hypercube evaluations of the libra_eval polynomial.

For a mask polynomial with n_vars variables and degree, generates a FieldBuffer of size 2^(m_n + m_d) containing:

libra_eval_r(j, k) = r[j]^k  if j < n_vars and k ≤ degree
                   = 0       otherwise

where j and k are derived from the hypercube index: idx = j * 2^m_d + k.

§Arguments

  • alloc - The allocator the expansion is drawn from
  • challenge_point - The challenge point r from sumcheck (length n_vars)
  • n_vars - Number of variables in the mask polynomial
  • degree - Degree of each univariate in the mask polynomial
  • m_n - Log of number of rows (must satisfy 2^m_n >= n_vars)
  • m_d - Log of row size (must satisfy 2^m_d >= degree + 1)

§Panics

Panics (in debug mode) if n_vars > 2^m_n or degree + 1 > 2^m_d.