Skip to main content

build_eq_x_r_vec

Function build_eq_x_r_vec 

Source
pub fn build_eq_x_r_vec<C: SemiringConfig>(
    cfg: &C,
    r: &[C::Element],
) -> Result<Vec<C::Element>, ArithErrors>
Expand description

This function builds the eq(x, r) polynomial for any given r, and outputs the evaluation of eq(x, r) in its vector form.

Evaluate $eq(x,y) = \prod_i=1^num_var (x_i * y_i + (1-x_i)(1-y_i))$ over r, which is $eq(x,y) = \prod_i=1^num_var (x_i * r_i + (1-x_i)(1-r_i))$