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

An iterator over the "words" underlying a bit-store.
You get this iterator by calling the BitStore::store_words() method. More...

#include <Iterators.h>

Detailed Description

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

An iterator over the "words" underlying a bit-store.
You get this iterator by calling the BitStore::store_words() method.

This is a constant iterator that returns the "words" underlying a bit-store as successive Words.

Example

auto v = BitVec<u8>::ones(10);
assert_eq(v.to_string(), "1111111111");
auto words = std::ranges::to<std::vector>(v.store_words());
assert_eq(words, (std::vector<std::uint8_t>{0b1111'1111, 0b0000'0011}));
static constexpr BitVec ones(usize n)
Factory method to generate a bit-vector of length n where the elements are all 1.
Definition BitVec.h:220