Module logicng

Class PBBinaryMerge

  • All Implemented Interfaces:
    PBEncoding

    public final class PBBinaryMerge
    extends Object
    implements PBEncoding
    The binary merge encoding for pseudo-Boolean constraints to CNF due to Manthey, Philipp, and Steinke.
    Since:
    1.1
    Version:
    2.0.0
    • Method Detail

      • encode

        public List<Formula> encode​(LNGVector<Literal> lts,
                                    LNGIntVector cffs,
                                    int rhs,
                                    List<Formula> formula)
        Description copied from interface: PBEncoding
        Encodes a pseudo-Boolean constraint and returns its CNF encoding.
        Specified by:
        encode in interface PBEncoding
        Parameters:
        lts - the literals of the constraint
        cffs - the coefficients of the constraint
        rhs - the right-hand side of the constraint
        formula - the current result CNF
        Returns:
        the CNF encoding of the constraint