GF2++
Loading...
Searching...
No Matches
gf2::UnsetBitsIter< Store >

An iterator over the index locations of the unset bits in a bit-store.
You get this iterator by calling the BitStore::unset_bit_indices() method. More...

#include <Iterators.h>

Detailed Description

template<typename Store>
class gf2::UnsetBitsIter< Store >

An iterator over the index locations of the unset bits in a bit-store.
You get this iterator by calling the BitStore::unset_bit_indices() method.

This is a constant iterator that returns the indices of the unset bits in the store as successive usizes.

Example

assert_eq(v.to_string(), "1010101010");
auto indices = std::ranges::to<std::vector>(v.unset_bit_indices());
assert_eq(indices, (std::vector<usize>{1, 3, 5, 7, 9}));
static constexpr BitVec alternating(usize n)
Factory method to generate a bit-vector of length n looking like 101010....
Definition BitVec.h:255