Go to the documentation of this file.
68 cout <<
"bv1 count = " << bv1.
count() << endl;
69 cout <<
"bv2 count = " << bv2.
count() << endl;
103 std::vector<unsigned char> vect1;
104 std::vector<unsigned char> vect2;
106 vect1.resize(sbuf1.size());
107 vect2.resize(sbuf2.size());
109 ::memcpy(vect1.data(), sbuf1.buf(), sbuf1.size());
110 ::memcpy(vect2.data(), sbuf2.buf(), sbuf2.size());
136 cout <<
"bv4 count = " << bv4.
count() << endl;
137 bool eq = bv1.
equal(bv4);
140 cerr <<
"Logical error detected!" << endl;
144 cout <<
"bv4 is equal to bv1" << endl;
156 cout <<
"minus count = " << cnt_sub << endl;
163 auto bv5_cnt = bv5.
count();
164 cout <<
"bv5 count = " << bv5_cnt << endl;
166 if (cnt_sub != bv5_cnt)
168 cerr <<
"Logical error!" << endl;
172 catch(std::exception& ex)
174 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.
#define BM_DECLARE_TEMP_BLOCK(x)
size_type serialize(const BV &bv, unsigned char *buf, size_t buf_size)
Bitvector serialization into memory block.
static void fill_bvector(bm::bvector<> *bv)
void set_compression_level(unsigned clevel) BMNOEXCEPT
Set compression level.
bvector< Alloc > & set(size_type n, bool val=true)
Sets bit n if val is true, clears bit n if val is false.
size_type count() const BMNOEXCEPT
population cout (count of ON bits)
bool equal(const bvector< Alloc > &bvect) const BMNOEXCEPT
Equal comparison with an agr bit-vector.
Deserializer, performs logical operations between bit-vector and serialized bit-vector.
Bit-vector serialization class.
size_type deserialize(bvector_type &bv, const unsigned char *buf, set_operation op, bool exit_on_one=false)
Deserialize bvector using buffer as set operation argument.
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.