-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stats.java
113 lines (111 loc) · 2.65 KB
/
Stats.java
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import java.text.DecimalFormat;
public class Stats {
private String succsess;
private int N;
private double havg;
private double davg;
private double dn;
private double bstar;
private int problem;
private float alpha;
private float beta;
private long timeElapsed;
private int minDepth;
private int maxDepth;
public Stats(String succsess, int n, double havg, double davg, double dn, double bstar, int problem, float alpha,
float beta, long timeElapsed, int minDepth, int maxDepth) {
super();
this.succsess = succsess;
N = n;
this.havg = havg;
this.davg = davg;
this.dn = dn;
this.bstar = bstar;
this.problem = problem;
this.alpha = alpha;
this.beta = beta;
this.timeElapsed = timeElapsed;
this.minDepth = minDepth;
this.maxDepth = maxDepth;
}
public void printStats()
{
DecimalFormat formatter = new DecimalFormat("#0.000");
String div = "|";
System.out.println("Problem | Heuristic name | N | d/N | Success (Y/N) | Time (ms) | EBF | avg H value | Min | Avg | Max");
System.out.println(problem +" "+ div + "h("+alpha+":"+beta + ")" +" "+div + N + div +formatter.format(dn)+div+succsess+" " + div + timeElapsed +" "+ div + formatter.format(bstar)+" " + div
+ formatter.format(havg)+" " + div +formatter.format(minDepth)+ div + formatter.format(davg) + div + formatter.format(maxDepth));
}
public String getSuccsess() {
return succsess;
}
public void setSuccsess(String succsess) {
this.succsess = succsess;
}
public int getN() {
return N;
}
public void setN(int n) {
N = n;
}
public double getHavg() {
return havg;
}
public void setHavg(double havg) {
this.havg = havg;
}
public double getDavg() {
return davg;
}
public void setDavg(double davg) {
this.davg = davg;
}
public double getDn() {
return dn;
}
public void setDn(double dn) {
this.dn = dn;
}
public double getBstar() {
return bstar;
}
public void setBstar(double bstar) {
this.bstar = bstar;
}
public int getProblem() {
return problem;
}
public void setProblem(int problem) {
this.problem = problem;
}
public float getAlpha() {
return alpha;
}
public void setAlpha(float alpha) {
this.alpha = alpha;
}
public float getBeta() {
return beta;
}
public void setBeta(float beta) {
this.beta = beta;
}
public long getTimeElapsed() {
return timeElapsed;
}
public void setTimeElapsed(long timeElapsed) {
this.timeElapsed = timeElapsed;
}
public int getMinDepth() {
return minDepth;
}
public void setMinDepth(int minDepth) {
this.minDepth = minDepth;
}
public int getMaxDepth() {
return maxDepth;
}
public void setMaxDepth(int maxDepth) {
this.maxDepth = maxDepth;
}
}