2 public class TestRunner {
8 int iter = 1200; //200;
10 //Vector testdata = new Vector(iter);
11 FibHeap fh = new FibHeap();
12 FibHeap fh_t = new FibHeap();
13 for(int i = 0; i < iter; i++) {
14 int rand = (77 * seed + 1) % 1024;
15 //testdata.addElement(new Integer(rand));
17 fh = fh.insertFH(rand);
18 fh_t = fh_t.insertFH(rand);
20 // makeFH from the test data
21 /*FibHeap fh = new FibHeap();
22 for(int i = testdata.size(); i > 0; i++) {
23 fh = fh.insertFH((Integer)(testdata.elementAt(i-1)).intValue());
25 FibHeap fh_t = new FibHeap();
26 for(int i = testdata.size(); i > 0; i++) {
27 fh_t = fh_t.insertFH((Integer)(testdata.elementAt(i-1)).intValue());
30 int[] rfh = new int[iter];
31 int[] rfh_t = new int[iter];
34 while(!fh.isEmpty()) {
36 fh = fh.deleteMinFH();
40 while(!fh_t.isEmpty()) {
41 rfh_t[j] = fh_t.minFH();
42 fh_t = fh_t.deleteMinFH_t();
50 for(i = 0; i < j; i++) {
51 if(rfh[i] != rfh_t[i]) {
59 public static void main(String[] args) {
61 for(int i = 0; i < threadnum; ++i) {
62 TestRunner tr = new TestRunner();