61 bm::bvector<>::statistics st;
64 cout <<
"Bits count:" << bv.
count() << endl;
65 cout <<
"Bit blocks:" << st.bit_blocks << endl;
66 cout <<
"GAP blocks:" << st.gap_blocks << endl;
67 cout <<
"Memory used:"<< st.memory_used << endl;
68 cout <<
"Max.serialize mem.:" << st.max_serialize_mem << endl << endl;;
94 catch(std::exception& ex)
96 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
size_type count() const BMNOEXCEPT
population cout (count of ON bits)
void optimize(bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)
Optimize memory bitvector's memory allocation.
void set_new_blocks_strat(strategy strat)
Sets new blocks allocation strategy.
bool set_bit(size_type n, bool val=true)
Sets bit n.
void calc_stat(struct bm::bvector< Alloc >::statistics *st) const BMNOEXCEPT
Calculates bitvector statistics.
@ BM_GAP
GAP compression is ON.
static void print_statistics(const bm::bvector<> &bv)
static void fill_bvector(bm::bvector<> *bv1, bm::bvector<> *bv2)