45template<
typename SV>
void PrintSV(
const SV& sv)
47 typename SV::const_iterator it = sv.begin();
48 typename SV::const_iterator it_end = sv.end();
50 for (
size_t i = 0; it != it_end; ++it, ++i)
53 cout << i <<
": " << *it <<
", ";
109 for (
size_t i = 0; i < req_size; ++i)
113 cout <<
"[" << ix <<
"] = " <<
"NULL" << endl;
115 cout <<
"[" << ix <<
"] = " << values[i] << endl;
120 catch(std::exception& ex)
122 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
Sparse constainer sparse_vector<> for integer types using bit-transposition transform.
Compressed sparse container rsc_sparse_vector<> for integer types.
pre-processor un-defines to avoid global space pollution (internal)
Bitvector Bit-vector container with runtime compression of bits.
bvector_size_type size_type
void set(size_type idx, value_type v)
set specified element with bounds checking and automatic resize
void sync(bool force)
Re-calculate rank-select index for faster access to vector.
bool in_sync() const BMNOEXCEPT
returns true if prefix sum table is in sync with the vector
void inc(size_type idx)
increment specified element by one
size_type gather(value_type *arr, const size_type *idx, size_type *idx_tmp_buf, size_type size, bm::sort_order sorted_idx) const
Gather elements to a C-style array.
succinct sparse vector with runtime compression using bit-slicing / transposition method
@ BM_UNKNOWN
sort order unknown
bm::sparse_vector< unsigned, bm::bvector<> > sparse_vector_u32
bm::rsc_sparse_vector< unsigned, sparse_vector_u32 > rsc_sparse_vector_u32
void PrintSV(const SV &sv)
Print sparse vector not NULL elements.