Go to the documentation of this file.
66 cout <<
"Bits count:" << bv.
count() << endl;
67 cout <<
"Bit blocks:" << st.
bit_blocks << endl;
68 cout <<
"GAP blocks:" << st.
gap_blocks << endl;
84 cout <<
"Bits count:" << bv.
count() << endl;
85 cout <<
"Bit blocks:" << st.
bit_blocks << endl;
86 cout <<
"GAP blocks:" << st.
gap_blocks << endl;
96 cout <<
"Serialized size:" << len << endl << endl;
104 unsigned char* buf1 = 0;
105 unsigned char* buf2 = 0;
135 auto sz = sbuf.size();
136 cout <<
"BV2 Serialized size:" << sz << endl;
170 std::cerr <<
"Error: bug in serialization" << std::endl;
177 cout <<
"BV_C Serialized size:" << sbuf2.size() << endl;
181 catch(std::exception& ex)
183 std::cerr << ex.what() << std::endl;
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.
void calc_stat(struct bm::bvector< Alloc >::statistics *st) const BMNOEXCEPT
Calculates bitvector statistics.
size_t max_serialize_mem
estimated maximum memory for serialization
void set_new_blocks_strat(strategy strat)
Sets new blocks allocation strategy.
static void fill_bvector(bm::bvector<> *bv)
size_t bit_blocks
Number of bit blocks.
bm::bvector< Alloc > & bit_or(const bm::bvector< Alloc > &bv1, const bm::bvector< Alloc > &bv2, typename bm::bvector< Alloc >::optmode opt_mode)
3-operand OR : this := bv1 OR bv2
#define BM_DECLARE_TEMP_BLOCK(x)
size_type serialize(const BV &bv, unsigned char *buf, size_t buf_size)
Bitvector serialization into memory block.
int compare(const bvector< Alloc > &bvect) const BMNOEXCEPT
Lexicographical comparison with a bitvector.
static unsigned char * serialize_bvector(bm::serializer< bm::bvector<> > &bvs, bm::bvector<> &bv)
size_t gap_blocks
Number of GAP blocks.
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 count() const BMNOEXCEPT
population cout (count of ON bits)
void gap_length_serialization(bool value) BMNOEXCEPT
Set GAP length serialization (serializes GAP levels of the original vector)
static void print_statistics(const bm::bvector<> &bv)
@ BM_GAP
GAP compression is ON.
Bit-vector serialization class.
Serialization / compression of bvector<>. Set theoretical operations on compressed BLOBs.
void byte_order_serialization(bool value) BMNOEXCEPT
Set byte-order serialization (for cross platform compatibility)
size_t memory_used
memory usage for all blocks and service tables
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
bool set_bit(size_type n, bool val=true)
Sets bit n.
void optimize(bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)
Optimize memory bitvector's memory allocation.
Statistical information about bitset's memory allocation details.