removed test prints
This commit is contained in:
@ -66,9 +66,7 @@ public class timsort {
|
|||||||
}
|
}
|
||||||
int[][] notMerged = new int[runs.size()][];
|
int[][] notMerged = new int[runs.size()][];
|
||||||
for(int i = 0; i < runs.size(); ++i) {
|
for(int i = 0; i < runs.size(); ++i) {
|
||||||
System.out.println("Runs before insertionsort: " + Arrays.toString(runs.get(i)));
|
|
||||||
notMerged[i] = insertionsort(runs.get(i));
|
notMerged[i] = insertionsort(runs.get(i));
|
||||||
System.out.println("After insertionsort: " + Arrays.toString(notMerged[i]));
|
|
||||||
}
|
}
|
||||||
return merge(notMerged)[0];
|
return merge(notMerged)[0];
|
||||||
}
|
}
|
||||||
@ -91,7 +89,6 @@ public class timsort {
|
|||||||
}
|
}
|
||||||
int lastW = w;
|
int lastW = w;
|
||||||
w = notMerged[i][j[0]] > notMerged[i + 1][j[1]] ? 1 : 0;
|
w = notMerged[i][j[0]] > notMerged[i + 1][j[1]] ? 1 : 0;
|
||||||
System.out.println("w: " + w);
|
|
||||||
temp[l] = notMerged[i + w][j[w]];
|
temp[l] = notMerged[i + w][j[w]];
|
||||||
++j[w];
|
++j[w];
|
||||||
if(w == lastW) ++gallopingCounter;
|
if(w == lastW) ++gallopingCounter;
|
||||||
@ -99,7 +96,6 @@ public class timsort {
|
|||||||
}
|
}
|
||||||
int b = w != 0 ? 0 : 1;
|
int b = w != 0 ? 0 : 1;
|
||||||
for(int k = j[b]; l < temp.length; ++k, ++l) {
|
for(int k = j[b]; l < temp.length; ++k, ++l) {
|
||||||
System.out.println("Index: " + k + " length: " + notMerged[i + b].length);
|
|
||||||
temp[l] = notMerged[i + b][k];
|
temp[l] = notMerged[i + b][k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user