Skip to main content

expand_subset_xors

Function expand_subset_xors 

Source
pub fn expand_subset_xors<U: UnderlierType, const N: usize, const N_EXP2: usize>(
    elems: [U; N],
) -> [U; N_EXP2]
Expand description

Expands elems into all 2^N subset XOR combinations, indexed by subset bitmask.

Entry mask holds the XOR of elems[i] over every bit i set in mask. This is the bitwise-XOR analogue of expand_subset_sums_array over raw underliers, used to build Method of Four Russians lookup tables.

ยงPreconditions

  • N_EXP2 must equal 2^N