void bitset( const Delta& u, BitSet& bit ) { const uint n = u.rows(); bit.resize( n, false ); for( Delta::InnerIterator it( u, 0 ); it; ++it ) { uint i = it.row(); bit[i] = true; } }
BitSet operator ^ (BitSet &that) { int sz = that.s.size(), n = this->s.size(), len = max(sz, n); if (sz < len) that.resize(len); if (n < len) this->resize(len); BitSet ans(len * 64); for (int i = len - 1; i >= 0; i --) { ans.s[i] = this->s[i] ^ that.s[i]; } return ans; }