View Javadoc

1   package org.sat4j.pb.core;
2   
3   import java.io.PrintWriter;
4   
5   import org.sat4j.minisat.core.SolverStats;
6   
7   public class PBSolverStats extends SolverStats {
8   
9   	/**
10  	 * 
11  	 */
12  	private static final long serialVersionUID = 1L;
13  
14  	public long numberOfReductions;
15  
16  	public long numberOfLearnedConstraintsReduced;
17  
18  	public long numberOfResolution;
19  
20  	public long numberOfCP;
21  
22  	@Override
23  	public void reset() {
24  		super.reset();
25  		numberOfReductions = 0;
26  		numberOfLearnedConstraintsReduced = 0;
27  		numberOfResolution = 0;
28  		numberOfCP = 0;
29  	}
30  
31  	@Override
32  	public void printStat(PrintWriter out, String prefix) {
33  		super.printStat(out, prefix);
34  		out.println(prefix
35  				+ "number of reductions to clauses (during analyze)\t: "
36  				+ numberOfReductions);
37  		out.println(prefix
38  				+ "number of learned constraints concerned by reduction\t: "
39  				+ numberOfLearnedConstraintsReduced);
40  		out.println(prefix + "number of learning phase by resolution\t: "
41  				+ numberOfResolution);
42  		out.println(prefix + "number of learning phase by cutting planes\t: "
43  				+ numberOfCP);
44  	}
45  
46  }