89 bv1.
set(1000000,
false);
108 bool f = bv3.
find(pos);
111 cout <<
"XOR mismatch position = " << pos << endl;
120 cout <<
"search mismatch position = " << pos << endl;
132 cerr <<
"Equivalent. Comparison result = "
137 cout <<
"Error." << endl;
141 catch(std::exception& ex)
143 std::cerr << ex.what() << std::endl;
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.
bool find(size_type &pos) const BMNOEXCEPT
Finds index of first 1 bit.
size_type get_next(size_type prev) const BMNOEXCEPT
Finds the number of the next bit ON.
bvector< Alloc > & set(size_type n, bool val=true)
Sets bit n if val is true, clears bit n if val is false.
bvector_size_type size_type
bool find_first_mismatch(const bvector< Alloc > &bvect, size_type &pos, size_type search_to=bm::id_max) const BMNOEXCEPT
Find index of first bit different between this and the agr vector.
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...
int compare(const bvector< Alloc > &bvect) const BMNOEXCEPT
Lexicographical comparison with a bitvector.
static void print_bvector(const bm::bvector<> &bv)