mirror of
https://github.com/mudler/luet.git
synced 2025-09-05 09:10:43 +00:00
update vendor/
This commit is contained in:
20
vendor/github.com/crillab/gophersat/solver/problem.go
generated
vendored
20
vendor/github.com/crillab/gophersat/solver/problem.go
generated
vendored
@@ -97,26 +97,6 @@ func (pb *Problem) updateStatus(nbClauses int) {
|
||||
}
|
||||
}
|
||||
|
||||
func (pb *Problem) simplify() {
|
||||
idxClauses := make([][]int, pb.NbVars*2) // For each lit, indexes of clauses it appears in
|
||||
removed := make([]bool, len(pb.Clauses)) // Clauses that have to be removed
|
||||
for i := range pb.Clauses {
|
||||
pb.simplifyClause(i, idxClauses, removed)
|
||||
if pb.Status == Unsat {
|
||||
return
|
||||
}
|
||||
}
|
||||
for i := 0; i < len(pb.Units); i++ {
|
||||
lit := pb.Units[i]
|
||||
neg := lit.Negation()
|
||||
clauses := idxClauses[neg]
|
||||
for j := range clauses {
|
||||
pb.simplifyClause(j, idxClauses, removed)
|
||||
}
|
||||
}
|
||||
pb.rmClauses(removed)
|
||||
}
|
||||
|
||||
func (pb *Problem) simplifyClause(idx int, idxClauses [][]int, removed []bool) {
|
||||
c := pb.Clauses[idx]
|
||||
k := 0
|
||||
|
Reference in New Issue
Block a user