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