(array: &[u64])
| 48 | /// Count all bits (i.e. ones) within an array |
| 49 | #[must_use] |
| 50 | pub(crate) fn count_all_bits(array: &[u64]) -> u64 { |
| 51 | array.iter().map(|x| x.count_ones() as u64).sum() |
| 52 | } |
| 53 | |
| 54 | /// Returns an iterator of the bit index of all the bits in `array) |
| 55 | pub(crate) fn bit_iter(array: &[u64]) -> impl Iterator<Item = usize> + '_ { |
no outgoing calls
no test coverage detected