From b4aa443bdd89c39780f4dd598db1a7a087a5d2bc Mon Sep 17 00:00:00 2001 From: "Josiah (Gaming32) Glosson" Date: Sun, 3 Apr 2022 19:38:17 -0500 Subject: [PATCH] Revamp RunSortBuilder somewhat --- .../arrayv/groovyapi/RunSortBuilder.java | 50 ++++++++------- .../scripts/categories/concurrent.groovy | 44 ++++++------- .../scripts/categories/distribute.groovy | 36 +++++------ .../scripts/categories/exchange.groovy | 58 ++++++++--------- .../scripts/categories/hybrid.groovy | 64 +++++++++---------- .../scripts/categories/impractical.groovy | 48 +++++++------- .../scripts/categories/insertion.groovy | 28 ++++---- .../resources/scripts/categories/merge.groovy | 34 +++++----- .../resources/scripts/categories/misc.groovy | 4 +- .../scripts/categories/selection.groovy | 36 +++++------ 10 files changed, 203 insertions(+), 199 deletions(-) diff --git a/src/main/java/io/github/arrayv/groovyapi/RunSortBuilder.java b/src/main/java/io/github/arrayv/groovyapi/RunSortBuilder.java index 9aa0828a..bdacdcfb 100644 --- a/src/main/java/io/github/arrayv/groovyapi/RunSortBuilder.java +++ b/src/main/java/io/github/arrayv/groovyapi/RunSortBuilder.java @@ -103,13 +103,19 @@ public String toString() { /** * Merge the specified options with the options map - * @param opts The options to merge, generally obtained with {@link RunSortInfoExtension} + * @param optsMap The options to merge, generally using Groovy's keyword argument syntax + * @param optsEntries The options to merge, generally obtained with {@link RunSortInfoExtension} * @return {@code this} for chaining * @see RunSortInfoExtension */ @SafeVarargs - public final RunSortBuilder with(Map.Entry... opts) { - for (Map.Entry opt : opts) { + public final RunSortBuilder with(Map optsMap, Map.Entry... optsEntries) { + if (optsMap != null) { + for (Map.Entry opt : optsMap.entrySet()) { + put(opt); + } + } + for (Map.Entry opt : optsEntries) { put(opt); } return this; @@ -117,36 +123,34 @@ public final RunSortBuilder with(Map.Entry... opts) { /** * Merge the specified options with the options map - * @param opts The options to merge + * @param opts The options to merge, generally obtained with {@link RunSortInfoExtension} * @return {@code this} for chaining + * @see RunSortInfoExtension */ - public RunSortBuilder with(Map opts) { - for (Map.Entry opt : opts.entrySet()) { - put(opt); - } - return this; + @SafeVarargs + public final RunSortBuilder with(Map.Entry... opts) { + return with(null, opts); } /** - *

Put one more option into the options map and run the sort

- * Equivalent to {@code with(opt).go()} or {@code with opt go()} - * @param opt The option to add + * Merge the specified options with the options map, and run the sort + * @param optsMap The options to merge, generally using Groovy's keyword argument syntax + * @param optsEntries The options to merge, generally obtained with {@link RunSortInfoExtension} + * @see RunSortInfoExtension */ - public void and(Map.Entry opt) { - put(opt); - finish(); + @SafeVarargs + public final void go(Map optsMap, Map.Entry... optsEntries) { + with(optsMap, optsEntries).finish(); } /** - * Run the sort + * Merge the specified options with the options map, and run the sort + * @param opts The options to merge, generally obtained with {@link RunSortInfoExtension} + * @see RunSortInfoExtension */ - public void run(Map opts) { - if (opts != null) { - for (Map.Entry opt : opts.entrySet()) { - put(opt); - } - } - finish(); + @SafeVarargs + public final void go(Map.Entry... opts) { + go(null, opts); } private void put(Map.Entry opt) { diff --git a/src/main/resources/scripts/categories/concurrent.groovy b/src/main/resources/scripts/categories/concurrent.groovy index b3207a2a..95b9ccb7 100644 --- a/src/main/resources/scripts/categories/concurrent.groovy +++ b/src/main/resources/scripts/categories/concurrent.groovy @@ -2,32 +2,32 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Concurrent Sorts', 22) { // Other - run FoldSort with 1024.numbers run() - run CreaseSort with 1024.numbers run() - run MatrixSort with 256.numbers and 0.667.speed + run FoldSort go 1024.numbers + run CreaseSort go 1024.numbers + run MatrixSort go 256.numbers, 0.667.speed // Recursive - run BitonicSortRecursive with 1024.numbers run() - run OddEvenMergeSortRecursive with 1024.numbers run() - run PairwiseSortRecursive with 1024.numbers run() - run BoseNelsonSortRecursive with 1024.numbers run() - run WeaveSortRecursive with 1024.numbers run() - run DiamondSortRecursive with 1024.numbers run() - run PairwiseMergeSortRecursive with 1024.numbers run() + run BitonicSortRecursive go 1024.numbers + run OddEvenMergeSortRecursive go 1024.numbers + run PairwiseSortRecursive go 1024.numbers + run BoseNelsonSortRecursive go 1024.numbers + run WeaveSortRecursive go 1024.numbers + run DiamondSortRecursive go 1024.numbers + run PairwiseMergeSortRecursive go 1024.numbers // Parallel - run BitonicSortParallel with 1024.numbers run() - run OddEvenMergeSortParallel with 1024.numbers run() - run BoseNelsonSortParallel with 1024.numbers run() - run WeaveSortParallel with 1024.numbers run() + run BitonicSortParallel go 1024.numbers + run OddEvenMergeSortParallel go 1024.numbers + run BoseNelsonSortParallel go 1024.numbers + run WeaveSortParallel go 1024.numbers // Iterative - run BitonicSortIterative with 1024.numbers run() - run OddEvenMergeSortIterative with 1024.numbers run() - run PairwiseSortIterative with 1024.numbers run() - run BoseNelsonSortIterative with 1024.numbers run() - run WeaveSortIterative with 1024.numbers run() - run MergeExchangeSortIterative with 1024.numbers run() - run DiamondSortIterative with 1024.numbers run() - run PairwiseMergeSortIterative with 1024.numbers run() + run BitonicSortIterative go 1024.numbers + run OddEvenMergeSortIterative go 1024.numbers + run PairwiseSortIterative go 1024.numbers + run BoseNelsonSortIterative go 1024.numbers + run WeaveSortIterative go 1024.numbers + run MergeExchangeSortIterative go 1024.numbers + run DiamondSortIterative go 1024.numbers + run PairwiseMergeSortIterative go 1024.numbers } diff --git a/src/main/resources/scripts/categories/distribute.groovy b/src/main/resources/scripts/categories/distribute.groovy index 2255a249..c67cd423 100644 --- a/src/main/resources/scripts/categories/distribute.groovy +++ b/src/main/resources/scripts/categories/distribute.groovy @@ -1,27 +1,27 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Distribution Sorts', 18) { - run CountingSort with 2048.numbers and 1.5.speed - run PigeonholeSort with 2048.numbers and 1.5.speed - run GravitySort with 1024.numbers and 0.5.speed - run ClassicGravitySort with 1024.numbers run() - run StaticSort with 2048.numbers run() - run IndexSort with 2048.numbers run() - run AmericanFlagSort with 2048.numbers, 128.buckets and 0.75.speed - run StacklessAmericanFlagSort with 2048.numbers, 128.buckets and 0.75.speed - run LSDRadixSort with 2048.numbers, 4.buckets and 1.5.speed + run CountingSort go 2048.numbers, 1.5.speed + run PigeonholeSort go 2048.numbers, 1.5.speed + run GravitySort go 1024.numbers, 0.5.speed + run ClassicGravitySort go 1024.numbers + run StaticSort go 2048.numbers + run IndexSort go 2048.numbers + run AmericanFlagSort go 2048.numbers, 128.buckets, 0.75.speed + run StacklessAmericanFlagSort go 2048.numbers, 128.buckets, 0.75.speed + run LSDRadixSort go 2048.numbers, 4.buckets, 1.5.speed def oldSofterSounds = arrayv.sounds.softerSounds arrayv.sounds.softerSounds = true - run InPlaceLSDRadixSort with 2048.numbers and 10.buckets + run InPlaceLSDRadixSort go 2048.numbers, 10.buckets arrayv.sounds.softerSounds = oldSofterSounds - run MSDRadixSort with 2048.numbers, 4.buckets and 1.25.speed - run FlashSort with 2048.numbers run() - run BinaryQuickSortIterative with 2048.numbers run() - run BinaryQuickSortRecursive with 2048.numbers run() - run StacklessBinaryQuickSort with 2048.numbers run() - run ShatterSort with 2048.numbers, 128.buckets run() - run SimpleShatterSort with 2048.numbers and 128.buckets - run TimeSort with 512.numbers, 10.buckets and 0.05.speed + run MSDRadixSort go 2048.numbers, 4.buckets, 1.25.speed + run FlashSort go 2048.numbers + run BinaryQuickSortIterative go 2048.numbers + run BinaryQuickSortRecursive go 2048.numbers + run StacklessBinaryQuickSort go 2048.numbers + run ShatterSort go 2048.numbers, 128.buckets + run SimpleShatterSort go 2048.numbers, 128.buckets + run TimeSort go 512.numbers, 10.buckets, 0.05.speed } diff --git a/src/main/resources/scripts/categories/exchange.groovy b/src/main/resources/scripts/categories/exchange.groovy index 438e6143..892c9a95 100644 --- a/src/main/resources/scripts/categories/exchange.groovy +++ b/src/main/resources/scripts/categories/exchange.groovy @@ -2,33 +2,33 @@ import io.github.arrayv.prompts.SortPrompt import io.github.arrayv.utils.Shuffles SortPrompt.setSortThreadForCategory('Exchange Sorts', 29) { - run UnoptimizedBubbleSort with 512.numbers and 1.5.speed - run BubbleSort with 512.numbers and 1.5.speed - run OptimizedBubbleSort with 512.numbers and 1.5.speed - run UnoptimizedCocktailShakerSort with 512.numbers and 1.25.speed - run CocktailShakerSort with 512.numbers and 1.25.speed - run OptimizedCocktailShakerSort with 512.numbers and 1.25.speed - run OddEvenSort with 512.numbers run() - run OptimizedStoogeSort with 512.numbers run() - run OptimizedStoogeSortStudio with 512.numbers run() - run FunSort with 256.numbers and 2.speed - run GnomeSort with 128.numbers and 0.025.speed - run OptimizedGnomeSort with 128.numbers and 0.025.speed - run BinaryGnomeSort with 128.numbers and 0.025.speed - run SlopeSort with 128.numbers and 0.025.speed - run CombSort with 1024.numbers and 130.buckets - run ThreeSmoothCombSortRecursive with 1024.numbers and 1.25.speed - run ThreeSmoothCombSortParallel with 1024.numbers and 1.25.speed - run ThreeSmoothCombSortIterative with 1024.numbers and 1.25.speed - run ClassicThreeSmoothCombSort with 1024.numbers and 1.25.speed - run CircleSortRecursive with 1024.numbers run() - run CircleSortIterative with 1024.numbers run() - run LLQuickSort with 2048.numbers and ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1.5 : 5).speed) - run LRQuickSort with 2048.numbers run() - run LRQuickSortParallel with 2048.numbers run() - run DualPivotQuickSort with 2048.numbers run() - run StableQuickSort with 2048.numbers and ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 6.5).speed) - run StableQuickSortParallel with 2048.numbers run() - run ForcedStableQuickSort with 2048.numbers run() - run TableSort with 1024.numbers and 0.75.speed + run UnoptimizedBubbleSort go 512.numbers, 1.5.speed + run BubbleSort go 512.numbers, 1.5.speed + run OptimizedBubbleSort go 512.numbers, 1.5.speed + run UnoptimizedCocktailShakerSort go 512.numbers, 1.25.speed + run CocktailShakerSort go 512.numbers, 1.25.speed + run OptimizedCocktailShakerSort go 512.numbers, 1.25.speed + run OddEvenSort go 512.numbers + run OptimizedStoogeSort go 512.numbers + run OptimizedStoogeSortStudio go 512.numbers + run FunSort go 256.numbers, 2.speed + run GnomeSort go 128.numbers, 0.025.speed + run OptimizedGnomeSort go 128.numbers, 0.025.speed + run BinaryGnomeSort go 128.numbers, 0.025.speed + run SlopeSort go 128.numbers, 0.025.speed + run CombSort go 1024.numbers, 130.buckets + run ThreeSmoothCombSortRecursive go 1024.numbers, 1.25.speed + run ThreeSmoothCombSortParallel go 1024.numbers, 1.25.speed + run ThreeSmoothCombSortIterative go 1024.numbers, 1.25.speed + run ClassicThreeSmoothCombSort go 1024.numbers, 1.25.speed + run CircleSortRecursive go 1024.numbers + run CircleSortIterative go 1024.numbers + run LLQuickSort go 2048.numbers, ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1.5 : 5).speed) + run LRQuickSort go 2048.numbers + run LRQuickSortParallel go 2048.numbers + run DualPivotQuickSort go 2048.numbers + run StableQuickSort go 2048.numbers, ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 6.5).speed) + run StableQuickSortParallel go 2048.numbers + run ForcedStableQuickSort go 2048.numbers + run TableSort go 1024.numbers, 0.75.speed } diff --git a/src/main/resources/scripts/categories/hybrid.groovy b/src/main/resources/scripts/categories/hybrid.groovy index ade30928..3e083a68 100644 --- a/src/main/resources/scripts/categories/hybrid.groovy +++ b/src/main/resources/scripts/categories/hybrid.groovy @@ -2,36 +2,36 @@ import io.github.arrayv.prompts.SortPrompt import io.github.arrayv.utils.Shuffles SortPrompt.setSortThreadForCategory('Hybrid Sorts', 32) { - run HybridCombSort with 1024.numbers run() - run IntroCircleSortRecursive with 1024.numbers run() - run IntroCircleSortIterative with 1024.numbers run() - run BinaryMergeSort with 2048.numbers run() - run MergeInsertionSort with 2048.numbers and 1.75.speed - run WeaveMergeSort with 2048.numbers and ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1.65 : 6.5).speed) - run TimSort with 2048.numbers run() - run CocktailMergeSort with 2048.numbers run() - run LaziestSort with 1024.numbers run() - run WikiSort with 2048.numbers run() - run GrailSort with 2048.numbers run() - run AdaptiveGrailSort with 2048.numbers run() - run UnstableGrailSort with 2048.numbers run() - run SqrtSort with 2048.numbers run() - run KotaSort with 2048.numbers run() - run EctaSort with 2048.numbers run() - run ParallelBlockMergeSort with 2048.numbers run() - run ParallelGrailSort with 2048.numbers run() - run FlanSort with 2048.numbers run() - run RemiSort with 2048.numbers run() - run ImprovedBlockSelectionSort with 2048.numbers run() - run MedianMergeSort with 2048.numbers run() - run BufferPartitionMergeSort with 2048.numbers run() - run IntroSort with 2048.numbers run() - run OptimizedBottomUpMergeSort with 2048.numbers run() - run OptimizedDualPivotQuickSort with 2048.numbers and 0.75.speed - run OptimizedWeaveMergeSort with 1024.numbers and 0.4.speed - run StacklessHybridQuickSort with 2048.numbers and 0.75.speed - run StacklessDualPivotQuickSort with 2048.numbers and 0.75.speed - run PDQBranchedSort with 2048.numbers and 0.75.speed - run PDQBranchlessSort with 2048.numbers and 0.75.speed - run DropMergeSort with 2048.numbers and 0.75.speed + run HybridCombSort go 1024.numbers + run IntroCircleSortRecursive go 1024.numbers + run IntroCircleSortIterative go 1024.numbers + run BinaryMergeSort go 2048.numbers + run MergeInsertionSort go 2048.numbers, 1.75.speed + run WeaveMergeSort go 2048.numbers, ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1.65 : 6.5).speed) + run TimSort go 2048.numbers + run CocktailMergeSort go 2048.numbers + run LaziestSort go 1024.numbers + run WikiSort go 2048.numbers + run GrailSort go 2048.numbers + run AdaptiveGrailSort go 2048.numbers + run UnstableGrailSort go 2048.numbers + run SqrtSort go 2048.numbers + run KotaSort go 2048.numbers + run EctaSort go 2048.numbers + run ParallelBlockMergeSort go 2048.numbers + run ParallelGrailSort go 2048.numbers + run FlanSort go 2048.numbers + run RemiSort go 2048.numbers + run ImprovedBlockSelectionSort go 2048.numbers + run MedianMergeSort go 2048.numbers + run BufferPartitionMergeSort go 2048.numbers + run IntroSort go 2048.numbers + run OptimizedBottomUpMergeSort go 2048.numbers + run OptimizedDualPivotQuickSort go 2048.numbers, 0.75.speed + run OptimizedWeaveMergeSort go 1024.numbers, 0.4.speed + run StacklessHybridQuickSort go 2048.numbers, 0.75.speed + run StacklessDualPivotQuickSort go 2048.numbers, 0.75.speed + run PDQBranchedSort go 2048.numbers, 0.75.speed + run PDQBranchlessSort go 2048.numbers, 0.75.speed + run DropMergeSort go 2048.numbers, 0.75.speed } diff --git a/src/main/resources/scripts/categories/impractical.groovy b/src/main/resources/scripts/categories/impractical.groovy index 7560203a..9b101bd9 100644 --- a/src/main/resources/scripts/categories/impractical.groovy +++ b/src/main/resources/scripts/categories/impractical.groovy @@ -1,37 +1,37 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Impractical Sorts', 32) { - run BadSort with 64.numbers and 0.0075.speed - run StoogeSort with 64.numbers and 0.005.speed - run QuadStoogeSort with 64.numbers and 0.005.speed - run SillySort with 64.numbers and 0.5.speed - run SlowSort with 64.numbers and 0.5.speed - run SnuffleSort with 64.numbers and 0.25.speed - run HanoiSort with 8.numbers and 0.025.speed + run BadSort go 64.numbers, 0.0075.speed + run StoogeSort go 64.numbers, 0.005.speed + run QuadStoogeSort go 64.numbers, 0.005.speed + run SillySort go 64.numbers, 0.5.speed + run SlowSort go 64.numbers, 0.5.speed + run SnuffleSort go 64.numbers, 0.25.speed + run HanoiSort go 8.numbers, 0.025.speed // Bogosorts def oldSofterSounds = arrayv.sounds.softerSounds arrayv.sounds.softerSounds = true // The not-bad ones - run SelectionBogoSort with 64.numbers and 1e-9.speed - run BubbleBogoSort with 40.numbers and 1e-9.speed - run CocktailBogoSort with 40.numbers and 1e-9.speed - run LessBogoSort with 32.numbers and 1e-9.speed - run ExchangeBogoSort with 28.numbers and 1e-9.speed + run SelectionBogoSort go 64.numbers, 1e-9.speed + run BubbleBogoSort go 40.numbers, 1e-9.speed + run CocktailBogoSort go 40.numbers, 1e-9.speed + run LessBogoSort go 32.numbers, 1e-9.speed + run ExchangeBogoSort go 28.numbers, 1e-9.speed // The meh ones - run MedianQuickBogoSort with 12.numbers and 1e-9.speed - run QuickBogoSort with 9.numbers and 1e-9.speed - run MergeBogoSort with 9.numbers and 1e-9.speed - run SmartGuessSort with 8.numbers and 1e-9.speed + run MedianQuickBogoSort go 12.numbers, 1e-9.speed + run QuickBogoSort go 9.numbers, 1e-9.speed + run MergeBogoSort go 9.numbers, 1e-9.speed + run SmartGuessSort go 8.numbers, 1e-9.speed // The scary ones - run BozoSort with 7.numbers and 1e-9.speed - run DeterministicBogoSort with 7.numbers and 1e-9.speed - run SmartBogoBogoSort with 6.numbers and 1e-9.speed - run BogoSort with 6.numbers and 1e-9.speed - run OptimizedGuessSort with 5.numbers and 1e-9.speed - run RandomGuessSort with 5.numbers and 1e-9.speed - run GuessSort with 4.numbers and 1e-9.speed + run BozoSort go 7.numbers, 1e-9.speed + run DeterministicBogoSort go 7.numbers, 1e-9.speed + run SmartBogoBogoSort go 6.numbers, 1e-9.speed + run BogoSort go 6.numbers, 1e-9.speed + run OptimizedGuessSort go 5.numbers, 1e-9.speed + run RandomGuessSort go 5.numbers, 1e-9.speed + run GuessSort go 4.numbers, 1e-9.speed // aaaaaa - run BogoBogoSort with 4.numbers and 1e-9.speed + run BogoBogoSort go 4.numbers, 1e-9.speed arrayv.sounds.softerSounds = oldSofterSounds } diff --git a/src/main/resources/scripts/categories/insertion.groovy b/src/main/resources/scripts/categories/insertion.groovy index b097b07e..8f68b55d 100644 --- a/src/main/resources/scripts/categories/insertion.groovy +++ b/src/main/resources/scripts/categories/insertion.groovy @@ -2,18 +2,18 @@ import io.github.arrayv.prompts.SortPrompt import io.github.arrayv.utils.Shuffles SortPrompt.setSortThreadForCategory('Insertion Sorts', 14) { - run InsertionSort with 128.numbers and 0.005.speed - run DoubleInsertionSort with 128.numbers and 0.002.speed - run BinaryInsertionSort with 128.numbers and 0.025.speed - run ShellSort with 256.numbers and 0.1.speed - run RecursiveShellSort with 256.numbers and 0.1.speed - run ShellSortParallel with 256.numbers and 0.1.speed - run SimplifiedLibrarySort with 2048.numbers run() - run LibrarySort with 2048.numbers run() - run PatienceSort with 2048.numbers run() - run ClassicTreeSort with 2048.numbers and ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 5).speed) - run TreeSort with 2048.numbers and ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 5).speed) - run AATreeSort with 2048.numbers run() - run AVLTreeSort with 2048.numbers run() - run SplaySort with 2048.numbers run() + run InsertionSort go 128.numbers, 0.005.speed + run DoubleInsertionSort go 128.numbers, 0.002.speed + run BinaryInsertionSort go 128.numbers, 0.025.speed + run ShellSort go 256.numbers, 0.1.speed + run RecursiveShellSort go 256.numbers, 0.1.speed + run ShellSortParallel go 256.numbers, 0.1.speed + run SimplifiedLibrarySort go 2048.numbers + run LibrarySort go 2048.numbers + run PatienceSort go 2048.numbers + run ClassicTreeSort go 2048.numbers, ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 5).speed) + run TreeSort go 2048.numbers, ((arrayv.arrayManager.containsShuffle(Shuffles.RANDOM) ? 1 : 5).speed) + run AATreeSort go 2048.numbers + run AVLTreeSort go 2048.numbers + run SplaySort go 2048.numbers } diff --git a/src/main/resources/scripts/categories/merge.groovy b/src/main/resources/scripts/categories/merge.groovy index fd13f7da..074e25e6 100644 --- a/src/main/resources/scripts/categories/merge.groovy +++ b/src/main/resources/scripts/categories/merge.groovy @@ -1,21 +1,21 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Merge Sorts', 17) { - run MergeSort with 2048.numbers and 1.5.speed - run BottomUpMergeSort with 2048.numbers and 1.5.speed - run MergeSortParallel with 2048.numbers and 1.5.speed - run IterativeTopDownMergeSort with 2048.numbers and 1.5.speed - run WeavedMergeSort with 2048.numbers and 1.5.speed - run TwinSort with 2048.numbers and 1.5.speed - run PDMergeSort with 2048.numbers run() - run InPlaceMergeSort with 2048.numbers and 1.5.speed - run ImprovedInPlaceMergeSort with 2048.numbers and 1.5.speed - run LazyStableSort with 256.numbers and 0.2.speed - run BlockSwapMergeSort with 256.numbers and 0.1.speed - run RotateMergeSort with 512.numbers and 0.2.speed - run RotateMergeSortParallel with 512.numbers and 0.2.speed - run AndreySort with 2048.numbers run() - run NewShuffleMergeSort with 1024.numbers run() - run StrandSort with 2048.numbers run() - run BufferedStoogeSort with 256.numbers and 0.2.speed + run MergeSort go 2048.numbers, 1.5.speed + run BottomUpMergeSort go 2048.numbers, 1.5.speed + run MergeSortParallel go 2048.numbers, 1.5.speed + run IterativeTopDownMergeSort go 2048.numbers, 1.5.speed + run WeavedMergeSort go 2048.numbers, 1.5.speed + run TwinSort go 2048.numbers, 1.5.speed + run PDMergeSort go 2048.numbers + run InPlaceMergeSort go 2048.numbers, 1.5.speed + run ImprovedInPlaceMergeSort go 2048.numbers, 1.5.speed + run LazyStableSort go 256.numbers, 0.2.speed + run BlockSwapMergeSort go 256.numbers, 0.1.speed + run RotateMergeSort go 512.numbers, 0.2.speed + run RotateMergeSortParallel go 512.numbers, 0.2.speed + run AndreySort go 2048.numbers + run NewShuffleMergeSort go 1024.numbers + run StrandSort go 2048.numbers + run BufferedStoogeSort go 256.numbers, 0.2.speed } diff --git a/src/main/resources/scripts/categories/misc.groovy b/src/main/resources/scripts/categories/misc.groovy index ee9cf64d..933fabbd 100644 --- a/src/main/resources/scripts/categories/misc.groovy +++ b/src/main/resources/scripts/categories/misc.groovy @@ -1,6 +1,6 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Miscellaneous Sorts', 2) { - run PancakeSort with 128.numbers and 0.015.speed - run BurntPancakeSort with 128.numbers and 0.015.speed + run PancakeSort go 128.numbers, 0.015.speed + run BurntPancakeSort go 128.numbers, 0.015.speed } diff --git a/src/main/resources/scripts/categories/selection.groovy b/src/main/resources/scripts/categories/selection.groovy index e9568181..7315bd48 100644 --- a/src/main/resources/scripts/categories/selection.groovy +++ b/src/main/resources/scripts/categories/selection.groovy @@ -1,22 +1,22 @@ import io.github.arrayv.prompts.SortPrompt SortPrompt.setSortThreadForCategory('Selection Sorts', 18) { - run SelectionSort with 128.numbers and 0.01.speed - run DoubleSelectionSort with 128.numbers and 0.01.speed - run StableSelectionSort with 128.numbers and 0.5.speed - run CycleSort with 128.numbers and 0.01.speed - run StableCycleSort with 128.numbers and 0.01.speed - run BingoSort with 128.numbers and 0.1.speed - run MaxHeapSort with 2048.numbers and 1.5.speed - run MinHeapSort with 2048.numbers and 1.5.speed - run FlippedMinHeapSort with 2048.numbers and 1.5.speed - run BaseNMaxHeapSort with 2048.numbers, 4.buckets and 1.5.speed - run TriangularHeapSort with 2048.numbers and 1.5.speed - run WeakHeapSort with 2048.numbers run() - run TernaryHeapSort with 2048.numbers run() - run SmoothSort with 2048.numbers and 1.5.speed - run PoplarHeapSort with 2048.numbers run() - run TournamentSort with 2048.numbers and 1.5.speed - run ClassicTournamentSort with 2048.numbers and 1.5.speed - run AsynchronousSort with 1024.numbers and 1.5.speed + run SelectionSort go 128.numbers, 0.01.speed + run DoubleSelectionSort go 128.numbers, 0.01.speed + run StableSelectionSort go 128.numbers, 0.5.speed + run CycleSort go 128.numbers, 0.01.speed + run StableCycleSort go 128.numbers, 0.01.speed + run BingoSort go 128.numbers, 0.1.speed + run MaxHeapSort go 2048.numbers, 1.5.speed + run MinHeapSort go 2048.numbers, 1.5.speed + run FlippedMinHeapSort go 2048.numbers, 1.5.speed + run BaseNMaxHeapSort go 2048.numbers, 4.buckets, 1.5.speed + run TriangularHeapSort go 2048.numbers, 1.5.speed + run WeakHeapSort go 2048.numbers + run TernaryHeapSort go 2048.numbers + run SmoothSort go 2048.numbers, 1.5.speed + run PoplarHeapSort go 2048.numbers + run TournamentSort go 2048.numbers, 1.5.speed + run ClassicTournamentSort go 2048.numbers, 1.5.speed + run AsynchronousSort go 1024.numbers, 1.5.speed }