1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.sat4j.minisat.constraints; |
8 |
| |
9 |
| import org.sat4j.minisat.constraints.cnf.CBClause; |
10 |
| import org.sat4j.minisat.constraints.cnf.WLClause; |
11 |
| import org.sat4j.minisat.core.Constr; |
12 |
| import org.sat4j.minisat.core.Propagatable; |
13 |
| import org.sat4j.specs.ContradictionException; |
14 |
| import org.sat4j.specs.IVec; |
15 |
| import org.sat4j.specs.IVecInt; |
16 |
| |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| public class ClausalDataStructureCB extends AbstractDataStructureFactory { |
22 |
| |
23 |
| private static final long serialVersionUID = 1L; |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
8713393
| @Override
|
32 |
| public void conflictDetectedInWatchesFor(int p, int i) { |
33 |
| |
34 |
| } |
35 |
| |
36 |
| |
37 |
| |
38 |
| |
39 |
| |
40 |
| |
41 |
153823864
| @Override
|
42 |
| public IVec<Propagatable> getWatchesFor(int p) { |
43 |
153823864
| return getVocabulary().watches(p);
|
44 |
| } |
45 |
| |
46 |
| |
47 |
| |
48 |
| |
49 |
| |
50 |
| |
51 |
249681
| public Constr createClause(IVecInt literals) throws ContradictionException {
|
52 |
249681
| IVecInt v = WLClause.sanityCheck(literals, getVocabulary(), solver);
|
53 |
249681
| if (v == null)
|
54 |
13
| return null;
|
55 |
249668
| return CBClause.brandNewClause(solver, getVocabulary(), v);
|
56 |
| } |
57 |
| |
58 |
| |
59 |
| |
60 |
| |
61 |
| |
62 |
| |
63 |
8713348
| public Constr createUnregisteredClause(IVecInt literals) {
|
64 |
8713348
| return new CBClause(literals, getVocabulary());
|
65 |
| } |
66 |
| |
67 |
| } |