Example for shifting - erase of bits.
- See also
- bm::bvector::erase
-
bm::bvector::shift_left
#include <iostream>
using namespace std;
{
if (first == last)
cout << "<EMPTY SET>";
else
for(;first != last; ++first)
cout << *first << ", ";
cout << endl;
}
{
try
{
cout << "Source set:";
bool carry_over = bv.shift_left();
cout << "CO=" << carry_over << endl;
bv.erase(0);
bv.optimize();
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
pre-processor un-defines to avoid global space pollution (internal)
Bitvector Bit-vector container with runtime compression of bits.
void optimize(bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)
Optimize memory bitvector's memory allocation.
void PrintContainer(T first, T last)