Go to the documentation of this file.
50 for (
unsigned i = start; i <
MAX_VALUE; ++i)
70 cout <<
"bv1 count = " << bv1.
count() << endl;
71 cout <<
"bv2 count = " << bv2.
count() << endl;
76 found = bv1.
find(first);
78 cout <<
"bv1 first = " << first << endl;
82 cout <<
"bv1 last = " << last << endl;
84 found = bv2.
find(first);
86 cout <<
"bv2 first = " << first << endl;
90 cout <<
"bv2 last = " << last << endl;
94 cout <<
"bv1 range = [" << first <<
", " << last <<
"]" << endl;
98 cout <<
"bv2 range = [" << first <<
", " << last <<
"]" << endl;
101 catch(std::exception& ex)
103 std::cerr << ex.what() << std::endl;
static void fill_bvector(bm::bvector<> *bv)
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 count() const BMNOEXCEPT
population cout (count of ON bits)
bool find(size_type &pos) const BMNOEXCEPT
Finds index of first 1 bit.
bool find_range(size_type &first, size_type &last) const BMNOEXCEPT
Finds dynamic range of bit-vector [first, last].
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
bool find_reverse(size_type &pos) const BMNOEXCEPT
Finds last index of 1 bit.