Skip to main content

anf

Function anf 

Source
pub fn anf(truth: &[bool]) -> Option<Vec<bool>>
Expand description

The algebraic normal form (ANF) of a Boolean function: coefficients over the 2ⁿ monomials ∏_{i∈S} xᵢ (S a variable bitmask), via the binary Möbius transform — the GF(2) dual of the Walsh–Hadamard butterfly, and its own inverse over GF(2) (applying it to the ANF returns the truth table). anf[S] is true iff the monomial ∏_{i∈S} xᵢ is present. None for a malformed table.