-
- All Known Implementing Classes:
CCEXKTotalizer
public interface CCExactlyKThe interface for exactly-k (ALK) cardinality constraints.- Since:
- 1.1
- Version:
- 2.0.0
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
build
void build(EncodingResult result, Variable[] vars, int rhs)
Builds a cardinality constraint of the formvar_1 + var_2 + ... + var_n = k.- Parameters:
result- the result of the encodingvars- the variablesvar_1 ... var_nrhs- the right-hand sidekof the constraint- Throws:
IllegalArgumentException- if the right-hand side of the cardinality constraint is negative
-
incrementalData
CCIncrementalData incrementalData()
Returns the incremental data for the current encoded constraint.- Returns:
- the incremental data for the current encoded constraint
-
-