44 cout <<
"1. bitcount: " << bv.
count() << endl;
54 cout <<
"2. bitcount: " << bv.
count() << endl;
78 cout <<
"3. bitcount: " << bv.
count() << endl;
86 cout <<
"4. bitcount: " << bv.
count() << endl;
93 cout <<
"5. bitcount: " << bv.
count() << endl;
95 catch(std::exception& ex)
97 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
Bitvector Bit-vector container with runtime compression of bits.
size_type count() const BMNOEXCEPT
population cout (count of ON bits)
bvector< Alloc > & set(size_type n, bool val=true)
Sets bit n if val is true, clears bit n if val is false.
size_type get_next(size_type prev) const BMNOEXCEPT
Finds the number of the next bit ON.
size_type get_first() const BMNOEXCEPT
find first 1 bit in vector. Function may return 0 and this requires an extra check if bit 0 is actual...
void clear(const size_type *ids, size_type ids_size, bm::sort_order so=bm::BM_UNKNOWN)
clear list of bits in this bitset