mirror of
https://gitlab.uni-marburg.de/langbeid/powersort.git
synced 2025-01-21 19:50:35 +01:00
Added FasterFinnSort to the Sort-Enum and created a test class
This commit is contained in:
parent
3974f575a9
commit
c8bed52bf6
@ -1,6 +1,7 @@
|
||||
package de.uni_marburg.powersort.benchmark;
|
||||
|
||||
import de.uni_marburg.powersort.data.DataEnum;
|
||||
import
|
||||
de.uni_marburg.powersort.data.DataEnum;
|
||||
import de.uni_marburg.powersort.sort.SortEnum;
|
||||
import de.uni_marburg.powersort.data.ObjectSupplier;
|
||||
|
||||
@ -17,7 +18,7 @@ public class Main {
|
||||
|
||||
System.out.println();
|
||||
for (DataEnum dataEnum : dataEnums) {
|
||||
System.out.println("⏳ Creating object supplier " + dataEnum + " ⏳");
|
||||
System.out.println(" Creating object supplier " + dataEnum + " ");
|
||||
ObjectSupplier objectSupplier = dataEnum.getObjectSupplier();
|
||||
|
||||
for (SortEnum sortImplementation : sortImplementations) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package de.uni_marburg.powersort.sort;
|
||||
|
||||
import de.uni_marburg.powersort.FinnSort.FinnSort;
|
||||
import de.uni_marburg.powersort.FinnSort.FasterFinnSort;
|
||||
import de.uni_marburg.powersort.benchmark.NaturalOrder;
|
||||
import de.uni_marburg.powersort.sort.dpqs.DualPivotQuicksort;
|
||||
|
||||
@ -11,6 +12,7 @@ public enum SortEnum {
|
||||
MERGE_SORT,
|
||||
TIM_SORT,
|
||||
FINN_SORT,
|
||||
FASTER_FINN_SORT,
|
||||
ASORT;
|
||||
|
||||
public SortImpl getSortImpl() {
|
||||
@ -21,6 +23,7 @@ public enum SortEnum {
|
||||
case MERGE_SORT -> array -> MergeSort.legacyMergeSort(array, NaturalOrder.INSTANCE);
|
||||
case TIM_SORT -> array -> TimSort.sort(array, 0, array.length, NaturalOrder.INSTANCE, null, 0, 0);
|
||||
case FINN_SORT -> array -> FinnSort.sort(array, NaturalOrder.INSTANCE);
|
||||
case FASTER_FINN_SORT -> array -> FasterFinnSort.sort(array, 0, array.length, NaturalOrder.INSTANCE, null, 0, 0);
|
||||
case ASORT -> array -> ASort.sort(array, NaturalOrder.INSTANCE);
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
package de.uni_marburg.powersort.sort;
|
||||
|
||||
public class FasterFinnSortTest extends AbstractSortTest {
|
||||
FasterFinnSortTest() {
|
||||
sortAlg = SortEnum.FASTER_FINN_SORT;
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user