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