@@ -34,8 +34,9 @@ of this software and associated documentation files (the "Software"), to deal
3434final public class RunMergeSorts extends MultipleSortThread {
3535 private Sort MergeSort ;
3636 private Sort BottomUpMergeSort ;
37- private Sort NaturalMergeSort ;
3837 private Sort PartialMergeSort ;
38+ private Sort TwinSort ;
39+ private Sort NaturalMergeSort ;
3940 private Sort PDMergeSort ;
4041 private Sort InPlaceMergeSort ;
4142 private Sort ImprovedInPlaceMergeSort ;
@@ -50,13 +51,14 @@ final public class RunMergeSorts extends MultipleSortThread {
5051
5152 public RunMergeSorts (ArrayVisualizer arrayVisualizer ) {
5253 super (arrayVisualizer );
53- this .sortCount = 15 ;
54+ this .sortCount = 16 ;
5455 this .categoryCount = this .sortCount ;
5556
5657 MergeSort = new MergeSort (this .arrayVisualizer );
5758 BottomUpMergeSort = new BottomUpMergeSort (this .arrayVisualizer );
58- NaturalMergeSort = new NaturalMergeSort (this .arrayVisualizer );
5959 PartialMergeSort = new PartialMergeSort (this .arrayVisualizer );
60+ TwinSort = new TwinSort (this .arrayVisualizer );
61+ NaturalMergeSort = new NaturalMergeSort (this .arrayVisualizer );
6062 PDMergeSort = new PDMergeSort (this .arrayVisualizer );
6163 InPlaceMergeSort = new InPlaceMergeSort (this .arrayVisualizer );
6264 ImprovedInPlaceMergeSort = new ImprovedInPlaceMergeSort (this .arrayVisualizer );
@@ -74,8 +76,9 @@ public RunMergeSorts(ArrayVisualizer arrayVisualizer) {
7476 protected synchronized void executeSortList (int [] array ) throws Exception {
7577 RunMergeSorts .this .runIndividualSort (MergeSort , 0 , array , 2048 , 1.5 , false );
7678 RunMergeSorts .this .runIndividualSort (BottomUpMergeSort , 0 , array , 2048 , 1.5 , false );
77- RunMergeSorts .this .runIndividualSort (NaturalMergeSort , 0 , array , 2048 , 1.5 , false );
7879 RunMergeSorts .this .runIndividualSort (PartialMergeSort , 0 , array , 2048 , 1.5 , false );
80+ RunMergeSorts .this .runIndividualSort (TwinSort , 0 , array , 2048 , 1.5 , false );
81+ RunMergeSorts .this .runIndividualSort (NaturalMergeSort , 0 , array , 2048 , 1.5 , false );
7982 RunMergeSorts .this .runIndividualSort (PDMergeSort , 0 , array , 2048 , 1 , false );
8083 RunMergeSorts .this .runIndividualSort (InPlaceMergeSort , 0 , array , 2048 , 1.5 , false );
8184 RunMergeSorts .this .runIndividualSort (ImprovedInPlaceMergeSort , 0 , array , 2048 , 1.5 , false );
0 commit comments