示例#1
0
BinaryRelation::BinaryRelation (
        const Carrier & carrier,
        BinaryRelation && other)
    : m_lines(carrier, std::move(other.m_lines))
{
    POMAGMA_DEBUG("resizing BinaryRelation with "
            << round_word_dim() << " words");
}
示例#2
0
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;
    }
}
示例#3
0
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;
    }
}
示例#4
0
BinaryRelation::BinaryRelation (const Carrier & carrier)
    : m_lines(carrier)
{
    POMAGMA_DEBUG("creating BinaryRelation with "
            << round_word_dim() << " words");
}