BitVector* BitVector::operator&(BitVector& rhs) { BitVector *res = new BitVector(); if (words.size() > rhs.words.size()) { res->copy(rhs); *res &= *this; return res; } res->copy(*this); *res &= rhs; return res; }
void BitVector::rleORnon(BitVector& bv) { // compress // run rleORrle BitVector *tmp = new BitVector(); tmp->copy(bv); tmp->compress(); rleORrle(*tmp); delete tmp; }
void BitVector::nonANDrle(BitVector& bv) { // decompress // run nonANDnon BitVector *tmp = new BitVector(); tmp->copy(bv); tmp->decompress(); nonANDnon(*tmp); delete tmp; }
BitVector* BitVector::copyflip() { BitVector *res = new BitVector(); res->copy(*this); res->flip(); return res; }