test and benchmark: add ASort

This commit is contained in:
Daniel Langbein 2024-12-16 21:20:06 +00:00
parent cb9ff240ea
commit e25a14f718
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
2 changed files with 10 additions and 1 deletions

View File

@ -7,7 +7,8 @@ public enum SortEnum {
// BUBBLE_SORT, // BUBBLE_SORT,
MERGE_SORT, MERGE_SORT,
TIM_SORT, TIM_SORT,
FIN_SORT; FIN_SORT,
ASORT;
public SimpleSort get() { public SimpleSort get() {
return switch (this) { return switch (this) {
@ -15,6 +16,7 @@ public enum SortEnum {
case MERGE_SORT -> array -> MergeSort.legacyMergeSort(array, NaturalOrder.INSTANCE); 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 TIM_SORT -> array -> TimSort.sort(array, 0, array.length, NaturalOrder.INSTANCE, null, 0, 0);
case FIN_SORT -> array -> FinnSort.sort(array, NaturalOrder.INSTANCE); case FIN_SORT -> array -> FinnSort.sort(array, NaturalOrder.INSTANCE);
case ASORT -> array -> ASort.sort(array, NaturalOrder.INSTANCE);
}; };
} }
} }

View File

@ -0,0 +1,7 @@
package de.uni_marburg.powersort.sort;
public class ASortTest extends AbstractSortTest {
ASortTest() {
sortAlg = SortEnum.ASORT;
}
}