- java.lang.Object
-
- org.logicng.cardinalityconstraints.CCALKModularTotalizer
-
- All Implemented Interfaces:
CCAtLeastK
public final class CCALKModularTotalizer extends Object implements CCAtLeastK
Encodes that at least 'rhs' variables can be assigned value true. Uses the modular totalizer encoding for translating the cardinality constraint into CNF.- Since:
- 1.0
- Version:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(EncodingResult result, Variable[] vars, int rhs)Builds a cardinality constraint of the formvar_1 + var_2 + ... + var_n >= k.CCIncrementalDataincrementalData()Returns the incremental data for the current encoded constraint.StringtoString()
-
-
-
Method Detail
-
build
public void build(EncodingResult result, Variable[] vars, int rhs)
Description copied from interface:CCAtLeastKBuilds a cardinality constraint of the formvar_1 + var_2 + ... + var_n >= k.- Specified by:
buildin interfaceCCAtLeastK- Parameters:
result- the result of the encodingvars- the variablesvar_1 ... var_nrhs- the right-hand sidekof the constraint
-
incrementalData
public CCIncrementalData incrementalData()
Description copied from interface:CCAtLeastKReturns the incremental data for the current encoded constraint.- Specified by:
incrementalDatain interfaceCCAtLeastK- Returns:
- the incremental data for the current encoded constraint
-
-