mirror of
https://github.com/mudler/luet.git
synced 2025-09-02 07:45:02 +00:00
update vendor/
This commit is contained in:
5
vendor/github.com/crillab/gophersat/solver/card.go
generated
vendored
5
vendor/github.com/crillab/gophersat/solver/card.go
generated
vendored
@@ -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.
|
||||
|
Reference in New Issue
Block a user