Skip to main content

gray_code

Function gray_code 

Source
pub fn gray_code(n_bits: u32) -> Result<Vec<usize>>
Expand description

The Gray code of every n-bit integer: code[i] = i ⊕ (i >> 1) (comnum_math::gray).

§Errors

Error::Config for more than MAX_GRAY_BITS bits.