68 cout <<
"Bits count:" << bv.
count() << endl;
69 cout <<
"Bit blocks:" << st.
bit_blocks << endl;
70 cout <<
"GAP blocks:" << st.
gap_blocks << endl;
88 cout <<
"Bits count:" << bv.
count() << endl;
89 cout <<
"Bit blocks:" << st.
bit_blocks << endl;
90 cout <<
"GAP blocks:" << st.
gap_blocks << endl;
100 cout <<
"Serialized size:" << len << endl << endl;
108 unsigned char* buf1 = 0;
109 unsigned char* buf2 = 0;
139 auto sz = sbuf.size();
140 cout <<
"BV2 Serialized size:" << sz << endl;
174 std::cerr <<
"Error: bug in serialization" << std::endl;
181 cout <<
"BV_C Serialized size:" << sbuf2.size() << endl;
185 catch(std::exception& ex)
187 std::cerr << ex.what() << std::endl;
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
#define BM_DECLARE_TEMP_BLOCK(x)
Serialization / compression of bvector<>. Set theoretical operations on compressed BLOBs.
pre-processor un-defines to avoid global space pollution (internal)
Bitvector Bit-vector container with runtime compression of bits.
bm::bvector< Alloc > & bit_or(const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode=opt_none)
3-operand OR : this := bv1 OR bv2
size_type count() const BMNOEXCEPT
population count (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.
int compare(const bvector< Alloc > &bvect) const BMNOEXCEPT
Lexicographical comparison with a bitvector.
void calc_stat(struct bm::bvector< Alloc >::statistics *st) const BMNOEXCEPT
Calculates bitvector statistics.
Bit-vector serialization class.
void gap_length_serialization(bool value) BMNOEXCEPT
Set GAP length serialization (serializes GAP levels of the original vector)
void byte_order_serialization(bool value) BMNOEXCEPT
Set byte-order serialization (for cross platform compatibility)
void optimize_serialize_destroy(BV &bv, typename serializer< BV >::buffer &buf)
Bitvector serialization into buffer object (resized automatically) Input bit-vector gets optimized an...
size_type serialize(const BV &bv, unsigned char *buf, size_t buf_size)
Bitvector serialization into memory block.
@ BM_GAP
GAP compression is ON.
size_t deserialize(BV &bv, const unsigned char *buf, bm::word_t *temp_block=0, const bm::bv_ref_vector< BV > *ref_vect=0)
Bitvector deserialization from a memory BLOB.
static void fill_bvector(bm::bvector<> *bv)
static void print_statistics(const bm::bvector<> &bv)
static unsigned char * serialize_bvector(bm::serializer< bm::bvector<> > &bvs, bm::bvector<> &bv)
size_t gap_blocks
Number of GAP blocks.
size_t bit_blocks
Number of bit blocks.
size_t max_serialize_mem
estimated maximum memory for serialization
size_t memory_used
memory usage for all blocks and service tables
Statistical information about bitset's memory allocation details.