Clover Coverage Report
Coverage timestamp: mer. juin 27 2007 07:27:16 CEST
11   43   2   2,75
2   30   0,45   4
4     1,25  
1    
 
  ArminRestarts       Line # 12 11 2 88,2% 0.88235295
 
No Tests
 
1    /*
2    * Created on 8 juin 07
3    *
4    * To change the template for this generated file go to
5    * Window>Preferences>Java>Code Generation>Code and Comments
6    */
7    package org.sat4j.minisat.restarts;
8   
9    import org.sat4j.minisat.core.RestartStrategy;
10    import org.sat4j.minisat.core.SearchParams;
11   
 
12    public class ArminRestarts implements RestartStrategy {
13   
14    private double inner,outer;
15    private long conflicts;
16    private SearchParams params;
17   
 
18  2 toggle 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   
 
25  4009 toggle public long nextRestartNumberOfConflict() {
26  4009 return conflicts;
27    }
28   
 
29  4009 toggle 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   
 
39  0 toggle @Override
40    public String toString() {
41  0 return "Armin Biere (Picosat) restarts strategy";
42    }
43    }