Module logicng

Interface PBEncoding

  • All Known Implementing Classes:
    PBAdderNetworks, PBBinaryMerge, PBSWC

    public interface PBEncoding
    The interface for pseudo Boolean constraint encodings.
    Since:
    1.1
    Version:
    1.1
    • Method Detail

      • encode

        List<Formula> encode​(LNGVector<Literal> lits,
                             LNGIntVector coeffs,
                             int rhs,
                             List<Formula> result)
        Encodes a pseudo-Boolean constraint and returns its CNF encoding.
        Parameters:
        lits - the literals of the constraint
        coeffs - the coefficients of the constraint
        rhs - the right-hand side of the constraint
        result - the current result CNF
        Returns:
        the CNF encoding of the constraint