A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/bm__sparse__sample_8cpp_source.html below:

NCBI C++ ToolKit: src/util/bitset/demo/bm_sparse_sample.cpp Source File

Go to the documentation of this file.

Go to the SVN repository for this file.

61 int main

(

int

,

const char

**)

71

svect.push_back(10000);

73

svect.push_back(90000);

75

svect.push_back(90001);

82

cout <<

"Element "

<< 100 <<

" "

<< svect[sparse_idx] << endl;

86  unsigned

sparse_idx = bv.

count_range

(0, 90001 - 1);

87

cout <<

"Element "

<< 90001 <<

" "

<< svect[sparse_idx] << endl;

100  unsigned

sparse_idx = bv.

count_range

(0, 100 - 1, rs_index);

101

cout <<

"Element "

<< 100 <<

" "

<< svect[sparse_idx] << endl;

105  unsigned

sparse_idx = bv.

count_range

(0, 90001 - 1, rs_index);

106

cout <<

"Element "

<< 90001 <<

" "

<< svect[sparse_idx] << endl;

114  for

(; en.

valid

(); ++en) {

115  unsigned

bit_idx = *en;

116  unsigned

sparse_idx = en.

count

()-1;

117

cout <<

"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