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
29
30 package org.sat4j.minisat.core;
31
32 import java.io.Serializable;
33 import java.lang.reflect.Field;
34
35
36
37
38
39
40
41 public class SearchParams implements Serializable {
42
43 private static final long serialVersionUID = 1L;
44
45
46
47
48
49 public SearchParams() {
50 this(0.95, 0.999, 1.5, 100);
51 }
52
53
54
55
56
57
58 public SearchParams(int conflictBound) {
59 this(0.95, 0.999, 1.5, conflictBound);
60 }
61
62 public SearchParams(double confincfactor, int conflictBound) {
63 this(0.95, 0.999, confincfactor, conflictBound);
64 }
65
66
67
68
69
70
71
72
73
74
75
76 public SearchParams(double d, double e, double f, int i) {
77 this.varDecay = d;
78 this.claDecay = e;
79 this.conflictBoundIncFactor = f;
80 this.initConflictBound = i;
81 }
82
83
84
85
86 public double getClaDecay() {
87 return this.claDecay;
88 }
89
90
91
92
93 public double getVarDecay() {
94 return this.varDecay;
95 }
96
97 private double claDecay;
98
99 private double varDecay;
100
101 private double conflictBoundIncFactor;
102
103 private int initConflictBound;
104
105
106
107
108
109
110 @Override
111 public String toString() {
112 StringBuffer stb = new StringBuffer();
113 for (Field field : SearchParams.class.getDeclaredFields()) {
114 if (!field.getName().startsWith("serial")
115 && !field.getName().startsWith("class")) {
116 stb.append(field.getName());
117 stb.append("=");
118 try {
119 stb.append(field.get(this));
120 } catch (IllegalArgumentException e) {
121 e.printStackTrace();
122 } catch (IllegalAccessException e) {
123 e.printStackTrace();
124 }
125 stb.append(" ");
126 }
127 }
128 return stb.toString();
129 }
130
131
132
133
134
135 public void setConflictBoundIncFactor(double conflictBoundIncFactor) {
136 this.conflictBoundIncFactor = conflictBoundIncFactor;
137 }
138
139
140
141
142
143 public void setInitConflictBound(int initConflictBound) {
144 this.initConflictBound = initConflictBound;
145 }
146
147
148
149
150 public double getConflictBoundIncFactor() {
151 return this.conflictBoundIncFactor;
152 }
153
154
155
156
157 public int getInitConflictBound() {
158 return this.initConflictBound;
159 }
160
161
162
163
164
165 public void setClaDecay(double claDecay) {
166 this.claDecay = claDecay;
167 }
168
169
170
171
172
173 public void setVarDecay(double varDecay) {
174 this.varDecay = varDecay;
175 }
176 }