Go to the SVN repository for this file.
61 int main(
int,
const char**)
71svect.push_back(10000);
73svect.push_back(90000);
75svect.push_back(90001);
82cout <<
"Element "<< 100 <<
" "<< svect[sparse_idx] << endl;
86 unsignedsparse_idx = bv.
count_range(0, 90001 - 1);
87cout <<
"Element "<< 90001 <<
" "<< svect[sparse_idx] << endl;
100 unsignedsparse_idx = bv.
count_range(0, 100 - 1, rs_index);
101cout <<
"Element "<< 100 <<
" "<< svect[sparse_idx] << endl;
105 unsignedsparse_idx = bv.
count_range(0, 90001 - 1, rs_index);
106cout <<
"Element "<< 90001 <<
" "<< svect[sparse_idx] << endl;
114 for(; en.
valid(); ++en) {
115 unsignedbit_idx = *en;
116 unsignedsparse_idx = en.
count()-1;
117cout <<
"Element "<< bit_idx <<
" "<< svect[sparse_idx] << endl;
int main(int, const char **)
Constant iterator designed to enumerate "ON" bits counted_enumerator keeps bitcount,...
size_type count() const noexcept
Number of bits ON starting from the .
bool valid() const noexcept
Checks if iterator is still valid.
size_type count_range(size_type left, size_type right, const rs_index_type &rs_idx) const noexcept
Returns count of 1 bits in the given range [left..right] Uses rank-select index to accelerate the sea...
enumerator first() const
Returns enumerator pointing on the first non-zero bit.
void build_rs_index(rs_index_type *rs_idx, bvector< Alloc > *bv_blocks=0) const
compute running total of all blocks in bit vector (rank-select index)
Rank-Select acceleration index.
Include a standard set of the NCBI C++ Toolkit most basic headers.
Compressed bitset (entry point to bm.h)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4