1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.sat4j.minisat.constraints; |
8 |
| |
9 |
| import java.math.BigInteger; |
10 |
| |
11 |
| import org.sat4j.minisat.constraints.pb.MaxWatchPb; |
12 |
| import org.sat4j.minisat.constraints.pb.WatchPb; |
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 PBMaxDataStructure extends AbstractPBDataStructureFactory { |
22 |
| |
23 |
| private static final long serialVersionUID = 1L; |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
499336
| @Override
|
34 |
| protected WatchPb constraintFactory(IVecInt literals, IVecInt coefs, |
35 |
| boolean moreThan, int degree) throws ContradictionException { |
36 |
499336
| return MaxWatchPb.maxWatchPbNew(solver, getVocabulary(), literals,
|
37 |
| coefs, moreThan, degree); |
38 |
| } |
39 |
| |
40 |
| |
41 |
| |
42 |
| |
43 |
| |
44 |
| |
45 |
| |
46 |
0
| @Override
|
47 |
| protected WatchPb constraintFactory(IVecInt literals, IVecInt coefs, |
48 |
| int degree) { |
49 |
0
| return MaxWatchPb.watchPbNew(getVocabulary(), literals, coefs, true,
|
50 |
| degree); |
51 |
| } |
52 |
| |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
| |
58 |
| |
59 |
| |
60 |
| |
61 |
279465
| @Override
|
62 |
| protected WatchPb constraintFactory(IVecInt literals, |
63 |
| IVec<BigInteger> coefs, boolean moreThan, BigInteger degree) |
64 |
| throws ContradictionException { |
65 |
279465
| return MaxWatchPb.maxWatchPbNew(solver, getVocabulary(), literals,
|
66 |
| coefs, moreThan, degree); |
67 |
| } |
68 |
| |
69 |
| |
70 |
| |
71 |
| |
72 |
| |
73 |
| |
74 |
| |
75 |
165820
| @Override
|
76 |
| protected WatchPb constraintFactory(IVecInt literals, |
77 |
| IVec<BigInteger> coefs, BigInteger degree) { |
78 |
165820
| return MaxWatchPb.watchPbNew(getVocabulary(), literals, coefs, true,
|
79 |
| degree); |
80 |
| } |
81 |
| |
82 |
| } |