45 unsigned arr[3] = {1,2,3};
54 cout <<
"sv1.size() = " << sv1.
size() <<
": ";
55 for (i = 0; i < sv1.
size(); ++i)
57 cout << sv1.
at(i) <<
",";
63 for (i = 65536; i < 65536+10; ++i)
67 cout <<
"sv2.size() = " << sv2.
size() << endl;
69 cout <<
"Perform sparse_vector<>::join()" << endl;
75 cout <<
"Now sv1.size() = " << sv1.
size() << endl;
78 std::vector<unsigned> v1(16);
79 sv1.
decode(&v1[0], 65530, 16);
80 for (i = 0; i < 16; ++i)
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
value_type at(size_type idx) const
access specified element with bounds checking
void optimize(bm::word_t *temp_block=0, typename bvector_type::optmode opt_mode=bvector_type::opt_compress, typename sparse_vector< Val, BV >::statistics *stat=0)
run memory optimization for all vector plains
Sparse constainer sparse_vector<> for integer types using bit-transposition transform.
size_type decode(value_type *arr, size_type idx_from, size_type dec_size, bool zero_mem=true) const
Bulk export list of elements to a C-style array.
void set(size_type idx, value_type v)
set specified element with bounds checking and automatic resize
sparse_vector< Val, BV > & join(const sparse_vector< Val, BV > &sv)
join all with another sparse vector using OR operation
void import(const value_type *arr, size_type arr_size, size_type offset=0)
Import list of elements from a C-style array.
#define BM_DECLARE_TEMP_BLOCK(x)
sparse vector with runtime compression using bit transposition method
size_type size() const
return size of the vector