| 40 | } |
| 41 | |
| 42 | BitVector BitVector::operator &(const BitVector& other) const |
| 43 | { |
| 44 | assert(size() == other.size()); |
| 45 | BitVector res(size()); |
| 46 | for (size_t i = 0; i < size_bytes(); i++) |
| 47 | res.bytes[i] = bytes[i] & other.bytes[i]; |
| 48 | return res; |
| 49 | } |
| 50 | |
| 51 | bool BitVector::parity() const |
| 52 | { |