1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.sat4j.minisat.constraints.cnf;
29
30 import org.sat4j.minisat.core.Constr;
31 import org.sat4j.minisat.core.UnitPropagationListener;
32 import org.sat4j.specs.IVecInt;
33
34
35
36
37
38
39 public class UnitClause implements Constr {
40
41 protected final int literal;
42
43 public UnitClause(int value) {
44 literal = value;
45 }
46
47 public void assertConstraint(UnitPropagationListener s) {
48 s.enqueue(literal, this);
49 }
50
51 public void calcReason(int p, IVecInt outReason) {
52 throw new UnsupportedOperationException();
53
54 }
55
56 public double getActivity() {
57 throw new UnsupportedOperationException();
58 }
59
60 public void incActivity(double claInc) {
61
62 }
63
64 public boolean locked() {
65 throw new UnsupportedOperationException();
66 }
67
68 public void register() {
69 throw new UnsupportedOperationException();
70 }
71
72 public void remove(UnitPropagationListener upl) {
73 upl.unset(literal);
74 }
75
76 public void rescaleBy(double d) {
77 throw new UnsupportedOperationException();
78 }
79
80 public void setLearnt() {
81 throw new UnsupportedOperationException();
82 }
83
84 public boolean simplify() {
85 throw new UnsupportedOperationException();
86 }
87
88 public boolean propagate(UnitPropagationListener s, int p) {
89 throw new UnsupportedOperationException();
90 }
91
92 public int get(int i) {
93 if (i > 0)
94 throw new IllegalArgumentException();
95 return literal;
96 }
97
98 public boolean learnt() {
99 throw new UnsupportedOperationException();
100 }
101
102 public int size() {
103 return 1;
104 }
105
106 public void forwardActivity(double claInc) {
107
108 }
109 }