Example how to use bvector<> in 64-bit mode.
Example how to use bvector<> in 64-bit mode
#include <iostream>
#include <assert.h>
#include "bm64.h"
using namespace std;
{
try
{
cout << "BitCount = " << count << endl;
cout <<
"Max possible ID = " <<
bm::id_max-1 << endl;
assert(range_found);
(void)range_found;
cout << "[" << first << ", " << last << "]" << endl;
auto full_count = bv_full.
count();
cout << "Full vector bitcount = " << full_count << endl;
bv &= bv_full;
bm::bvector<>::enumerator en = bv.
first();
for (; en.valid(); ++en)
{
cout << idx << ", ";
}
cout << endl;
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}
size_type count() const BMNOEXCEPT
population cout (count of ON bits)
bool find_range(size_type &first, size_type &last) const BMNOEXCEPT
Finds dynamic range of bit-vector [first, last].
bvector< Alloc > & set(size_type n, bool val=true)
Sets bit n if val is true, clears bit n if val is false.
enumerator first() const
Returns enumerator pointing on the first non-zero bit.
unsigned long long int id64_t