BinaryRelation::BinaryRelation ( const Carrier & carrier, BinaryRelation && other) : m_lines(carrier, std::move(other.m_lines)) { POMAGMA_DEBUG("resizing BinaryRelation with " << round_word_dim() << " words"); }
void BinaryRelation::_remove_Rx(Ob i, const DenseSet& js) { // slower version // for (auto j = js.iter(); j.ok(); j.next()) { // _remove_Rx(i, *j); //} // faster version Word mask = ~(Word(1) << (i % BITS_PER_WORD)); size_t offset = i / BITS_PER_WORD; Word* lines = m_lines.Rx() + offset; for (auto j = js.iter(); j.ok(); j.next()) { lines[*j * round_word_dim()] &= mask; } }
void BinaryRelation::_remove_Lx(const DenseSet& is, Ob j) { // slower version // for (auto i = is.iter(); i.ok(); i.next()) { // _remove_Lx(*i, j); //} // faster version Word mask = ~(Word(1) << (j % BITS_PER_WORD)); size_t offset = j / BITS_PER_WORD; Word* lines = m_lines.Lx() + offset; for (auto i = is.iter(); i.ok(); i.next()) { lines[*i * round_word_dim()] &= mask; } }
BinaryRelation::BinaryRelation (const Carrier & carrier) : m_lines(carrier) { POMAGMA_DEBUG("creating BinaryRelation with " << round_word_dim() << " words"); }