update vendor/

This commit is contained in:
Ettore Di Giacinto
2020-02-11 15:00:14 +01:00
parent c9090ef1fd
commit 33da68c2ff
11 changed files with 327 additions and 21 deletions

View File

@@ -15,10 +15,11 @@ func AtLeast1(lits ...int) CardConstr {
// AtMost1 returns a cardinality constraint stating that at most one of the given lits can be true.
func AtMost1(lits ...int) CardConstr {
negated := make([]int, len(lits))
for i, lit := range lits {
lits[i] = -lit
negated[i] = -lit
}
return CardConstr{Lits: lits, AtLeast: len(lits) - 1}
return CardConstr{Lits: negated, AtLeast: len(lits) - 1}
}
// Exactly1 returns two cardinality constraints stating that exactly one of the given lits must be true.