| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
package org.sat4j.minisat.restarts; |
| 8 |
|
|
| 9 |
|
import org.sat4j.minisat.core.RestartStrategy; |
| 10 |
|
import org.sat4j.minisat.core.SearchParams; |
| 11 |
|
|
|
|
|
| 88,2% |
Uncovered Elements: 2 (17) |
Complexity: 2 |
Complexity Density: 0,45 |
|
| 12 |
|
public class ArminRestarts implements RestartStrategy { |
| 13 |
|
|
| 14 |
|
private double inner,outer; |
| 15 |
|
private long conflicts; |
| 16 |
|
private SearchParams params; |
| 17 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
| 18 |
2
|
public void init(SearchParams params) {... |
| 19 |
2
|
this.params = params; |
| 20 |
2
|
inner = params.getInitConflictBound(); |
| 21 |
2
|
outer = params.getInitConflictBound(); |
| 22 |
2
|
conflicts = Math.round(inner); |
| 23 |
|
} |
| 24 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 25 |
4009
|
public long nextRestartNumberOfConflict() {... |
| 26 |
4009
|
return conflicts; |
| 27 |
|
} |
| 28 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 2 |
Complexity Density: 0,4 |
|
| 29 |
4009
|
public void onRestart() {... |
| 30 |
4009
|
if (inner>=outer) { |
| 31 |
124
|
outer *= params.getConflictBoundIncFactor(); |
| 32 |
124
|
inner = params.getInitConflictBound(); |
| 33 |
|
} else { |
| 34 |
3885
|
inner *= params.getConflictBoundIncFactor(); |
| 35 |
|
} |
| 36 |
4009
|
conflicts = Math.round(inner); |
| 37 |
|
} |
| 38 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 39 |
0
|
@Override... |
| 40 |
|
public String toString() { |
| 41 |
0
|
return "Armin Biere (Picosat) restarts strategy"; |
| 42 |
|
} |
| 43 |
|
} |