- java.lang.Object
-
- org.logicng.pseudobooleans.PBSWC
-
- All Implemented Interfaces:
PBEncoding
public final class PBSWC extends Object implements PBEncoding
A sequential weight counter for the encoding of pseudo-Boolean constraints in CNF.- Since:
- 1.0
- Version:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Formula>encode(LNGVector<Literal> lits, LNGIntVector coeffs, int rhs, List<Formula> result)Encodes a pseudo-Boolean constraint and returns its CNF encoding.StringtoString()
-
-
-
Method Detail
-
encode
public List<Formula> encode(LNGVector<Literal> lits, LNGIntVector coeffs, int rhs, List<Formula> result)
Description copied from interface:PBEncodingEncodes a pseudo-Boolean constraint and returns its CNF encoding.- Specified by:
encodein interfacePBEncoding- Parameters:
lits- the literals of the constraintcoeffs- the coefficients of the constraintrhs- the right-hand side of the constraintresult- the current result CNF- Returns:
- the CNF encoding of the constraint
-
-