fn synth<E: Engine>(
    window_size: usize,
    constants: &[E::Fr],
    assignment: &mut [E::Fr]
)
{
    assert_eq!(constants.len(), 1 << window_size);
    assert_eq!(assignment.len(), 1 << window_size);
    let mut v = vec![E::Fr::zero(); 1 << window_size];

    for (i, constant) in constants.iter().enumerate() {
        let mut cur = v[i];
        cur.negate();
        cur.add_assign(constant);
        assignment[i] = cur;
        for (j, eval) in v.iter_mut().enumerate().skip(i + 1) {
            if j & i == i {
                eval.add_assign(&cur);
            }
        }
    }
}
// Synthesize the constants for each base pattern.
Synthesize the constants for each base pattern.
Synthesize the constants for each base pattern .
fn synth<E: Engine>(
    window_size: usize,
    constants: &[E::Fr],
    assignment: &mut [E::Fr]
)
{
    assert_eq!(constants.len(), 1 << window_size);
    assert_eq!(assignment.len(), 1 << window_size);
    let mut v = vec![E::Fr::zero(); 1 << window_size];
    for (i, constant) in constants.iter().enumerate() {
        let mut cur = v[i];
        cur.negate();
        cur.add_assign(constant);
        assignment[i] = cur;
        for (j, eval) in v.iter_mut().enumerate().skip(i + 1) {
            if j & i == i {
                eval.add_assign(&cur);
            }
        }
    }
}
fn synth < E : Engine > ( window_size : usize , constants : & [ E :: Fr ] , assignment : & mut [ E :: Fr ] ) { assert_eq ! ( constants len ( ) 1 window_size ) ; assert_eq ! ( assignment len ( ) 1 window_size ) ; let mut v = vec ! [ E Fr zero ( ) 1 window_size ] ; for ( i , constant ) in constants . iter ( ) . enumerate ( ) { let mut cur = v [ i ] ; cur . negate ( ) ; cur . add_assign ( constant ) ; assignment [ i ] = cur ; for ( j , eval ) in v . iter_mut ( ) . enumerate ( ) . skip ( i + 1 ) { if j & i == i { eval . add_assign ( & cur ) ; } } } }
Synthesize the constants for each base pattern.
Synthesize the constants for each base pattern .
window_size
usize
constants
&[E::Fr]
assignment
&mut [E::Fr]
window_size
usize
constants
&[E::Fr]
assignment
&mut [E::Fr]