Go to the documentation of this file.
67 cout <<
"bv1 count = " << bv1.
count() << endl;
68 cout <<
"bv2 count = " << bv2.
count() << endl;
102 std::vector<unsigned char> vect1;
103 std::vector<unsigned char> vect2;
105 vect1.resize(sbuf1.size());
106 vect2.resize(sbuf2.size());
108 ::memcpy(vect1.data(), sbuf1.buf(), sbuf1.size());
109 ::memcpy(vect2.data(), sbuf2.buf(), sbuf2.size());
138 cout <<
"bv4 count = " << bv4.
count() << endl;
142 cerr <<
"Logical error detected!" << endl;
146 cout <<
"bv4 is equal to bv1" << endl;
161 cout <<
"minus count = " << cnt_sub << endl;
171 auto bv5_cnt = bv5.
count();
172 cout <<
"bv5 count = " << bv5_cnt << endl;
174 if (cnt_sub != bv5_cnt)
176 cerr <<
"Logical error!" << endl;
182 catch(std::exception& ex)
184 std::cerr << ex.what() << std::endl;
size_type count() const
population cout (count of ON bits)
size_t deserialize(BV &bv, const unsigned char *buf, bm::word_t *temp_block=0)
Bitvector deserialization from memory.
#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
Lexicographical comparison with a bitvector.
static void fill_bvector(bm::bvector<> *bv)
bvector< Alloc > & set(size_type n, bool val=true)
Sets bit n if val is true, clears bit n if val is false.
void set_compression_level(unsigned clevel)
Set compression level.
Deserializer, performs logical operations between bit-vector and serialized bit-vector.
Bit-vector serialization class.
Serialization / compression of bvector<>. Set theoretical operations on compressed BLOBs.
Compressed bit-vector bvector<> container, set algebraic methods, traversal iterators.
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.