1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.sat4j.minisat.constraints; |
8 |
| |
9 |
| import org.sat4j.minisat.constraints.cnf.WLClause; |
10 |
| import org.sat4j.minisat.core.Constr; |
11 |
| import org.sat4j.specs.ContradictionException; |
12 |
| import org.sat4j.specs.IVecInt; |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| |
18 |
| public class ClausalDataStructureWL extends AbstractDataStructureFactory { |
19 |
| |
20 |
| private static final long serialVersionUID = 1L; |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
1253010
| public Constr createClause(IVecInt literals) throws ContradictionException {
|
28 |
1253010
| IVecInt v = WLClause.sanityCheck(literals, getVocabulary(), solver);
|
29 |
1253000
| if (v == null)
|
30 |
67
| return null;
|
31 |
1252933
| return WLClause.brandNewClause(solver, getVocabulary(), v);
|
32 |
| } |
33 |
| |
34 |
83222957
| public Constr createUnregisteredClause(IVecInt literals) {
|
35 |
83222957
| return new WLClause(literals, getVocabulary());
|
36 |
| } |
37 |
| } |