46 unsigned arr[3] = {1,2,3};
55 cout <<
"sv1.size() = " << sv1.
size() << endl;
59 for (
unsigned i = 0; i < sv1.
size(); ++i)
61 cout << sv1.
at(i) <<
",";
66 unsigned arr2[5] = {10, 20, 30, 40, 50};
69 cout <<
"sv1.size() = " << sv1.
size() << endl;
71 for (
unsigned i = 0; i < sv1.
size(); ++i)
73 cout << sv1.
at(i) <<
",";
79 catch(std::exception& ex)
81 std::cerr << ex.what() << std::endl;
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.
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