Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sorts/SmartBogoSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public SmartBogoSort(Delays delayOps, Highlights markOps, Reads readOps, Writes
this.setSortPromptID("Smart Bogo");
this.setRunAllID("Permutation Sort");
this.setReportSortID("Permutation Sort");
this.setCategory("Distributive Sorts");
this.setCategory("Impractical Sorts");
this.isComparisonBased(false);
this.isBucketSort(false);
this.isRadixSort(false);
Expand Down
4 changes: 4 additions & 0 deletions src/threads/RunExchangeSorts.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sorts.CombSort;
import sorts.DualPivotQuickSort;
import sorts.GnomeSort;
import sorts.IterativeCombSort;
import sorts.LLQuickSort;
import sorts.LRQuickSort;
import sorts.OddEvenSort;
Expand Down Expand Up @@ -61,6 +62,7 @@ final public class RunExchangeSorts extends MultipleSortThread {
private Sort LRQuickSort;
private Sort DualPivotQuickSort;
private Sort StableQuickSort;
private Sort IterativeCombSort;

public RunExchangeSorts(ArrayVisualizer ArrayVisualizer) {
super(ArrayVisualizer);
Expand All @@ -81,6 +83,7 @@ public RunExchangeSorts(ArrayVisualizer ArrayVisualizer) {
LRQuickSort = new LRQuickSort(Delays, Highlights, Reads, Writes);
DualPivotQuickSort = new DualPivotQuickSort(Delays, Highlights, Reads, Writes);
StableQuickSort = new StableQuickSort(Delays, Highlights, Reads, Writes);
IterativeCombSort = new IterativeCombSort(Delays, Highlights, Reads, Writes);
}

@Override
Expand All @@ -94,6 +97,7 @@ protected synchronized void executeSortList(int[] array) throws Exception {
RunExchangeSorts.this.runIndividualSort(SmartGnomeSort, 0, array, 128, 0.025);
RunExchangeSorts.this.runIndividualSort(BinaryGnomeSort, 0, array, 128, 0.025);
RunExchangeSorts.this.runIndividualSort(CombSort, 0, array, 1024, 1);
RunExchangeSorts.this.runIndividualSort(IterativeCombSort, 0, array, 1024, 1);
RunExchangeSorts.this.runIndividualSort(CircleSort, 0, array, 1024, 1);
RunExchangeSorts.this.runIndividualSort(LLQuickSort, 0, array, 2048, ArrayManager.getShuffle() == Shuffles.RANDOM ? 1.5 : 65);
RunExchangeSorts.this.runIndividualSort(LRQuickSort, 0, array, 2048, 1);
Expand Down
8 changes: 6 additions & 2 deletions src/threads/RunImpracticalSorts.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sorts.LessBogoSort;
import sorts.SillySort;
import sorts.SlowSort;
import sorts.SmartBogoSort;
import sorts.StoogeSort;
import templates.JErrorPane;
import templates.MultipleSortThread;
Expand Down Expand Up @@ -49,13 +50,14 @@ final public class RunImpracticalSorts extends MultipleSortThread {
private Sort BubbleBogoSort;
private Sort LessBogoSort;
private Sort CocktailBogoSort;
private Sort SmartBogoSort;
private Sort BogoSort;

public RunImpracticalSorts(ArrayVisualizer ArrayVisualizer) {
super(ArrayVisualizer);
this.sortCount = 9;
this.categoryCount = this.sortCount;

BadSort = new BadSort(Delays, Highlights, Reads, Writes);
StoogeSort = new StoogeSort(Delays, Highlights, Reads, Writes);
SillySort = new SillySort(Delays, Highlights, Reads, Writes);
Expand All @@ -64,6 +66,7 @@ public RunImpracticalSorts(ArrayVisualizer ArrayVisualizer) {
BubbleBogoSort = new BubbleBogoSort(Delays, Highlights, Reads, Writes);
LessBogoSort = new LessBogoSort(Delays, Highlights, Reads, Writes);
CocktailBogoSort = new CocktailBogoSort(Delays, Highlights, Reads, Writes);
SmartBogoSort = new SmartBogoSort(Delays, Highlights, Reads, Writes);
BogoSort = new BogoSort(Delays, Highlights, Reads, Writes);
}

Expand All @@ -78,6 +81,7 @@ protected synchronized void executeSortList(int[] array) throws Exception {
RunImpracticalSorts.this.runIndividualSort(BubbleBogoSort, 0, array, 32, 0.01);
RunImpracticalSorts.this.runIndividualSort(LessBogoSort, 0, array, 16, 0.0025);
RunImpracticalSorts.this.runIndividualSort(CocktailBogoSort, 0, array, 16, 0.0025);
RunImpracticalSorts.this.runIndividualSort(SmartBogoSort, 0, array, 8, 1);
RunImpracticalSorts.this.runIndividualSort(BogoSort, 0, array, 8, 1);
Sounds.toggleSofterSounds(false);
}
Expand Down