Function alcibiades::bitsets::pop_count [] [src]

pub fn pop_count(b: Bitboard) -> usize

Returns the number of 1s in the binary representation of a value.

Examples:

assert_eq!(pop_count(0b100101), 3);
assert_eq!(pop_count(0), 0);