From c3ecfc5531508f30c541dc22c03ed01f9b571101 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 17 Dec 2024 08:28:09 +0000 Subject: [PATCH] benchmark: rm ObjectSupplier.title --- .../main/java/de/uni_marburg/powersort/benchmark/Main.java | 2 +- .../de/uni_marburg/powersort/data/AscendingIntegers.java | 6 ------ .../java/de/uni_marburg/powersort/data/AscendingRuns.java | 5 ----- .../de/uni_marburg/powersort/data/DescendingIntegers.java | 6 ------ .../java/de/uni_marburg/powersort/data/ObjectSupplier.java | 5 ----- .../java/de/uni_marburg/powersort/data/RandomIntegers.java | 6 ------ 6 files changed, 1 insertion(+), 29 deletions(-) diff --git a/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java b/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java index c70bfcc..5335757 100644 --- a/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java +++ b/app/src/main/java/de/uni_marburg/powersort/benchmark/Main.java @@ -17,7 +17,7 @@ public class Main { for (DataEnum dataEnum : dataEnums) { ObjectSupplier objectSupplier = dataEnum.get(); - System.out.println("\n" + objectSupplier.title()); + System.out.println(dataEnum); for (SortEnum sortImplementation : sortImplementations) { Object[] sortInput = objectSupplier.getCopy(); diff --git a/app/src/main/java/de/uni_marburg/powersort/data/AscendingIntegers.java b/app/src/main/java/de/uni_marburg/powersort/data/AscendingIntegers.java index 8050a21..c7d89f8 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/AscendingIntegers.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/AscendingIntegers.java @@ -1,15 +1,9 @@ package de.uni_marburg.powersort.data; import de.uni_marburg.powersort.benchmark.IntegerArray; -import de.uni_marburg.powersort.benchmark.LongFormatter; public class AscendingIntegers extends IntegerSupplier { public AscendingIntegers(int size) { super(IntegerArray.ascending( 1, size)); } - - @Override - public String title() { - return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " ascending Integer objects."; - } } diff --git a/app/src/main/java/de/uni_marburg/powersort/data/AscendingRuns.java b/app/src/main/java/de/uni_marburg/powersort/data/AscendingRuns.java index be1a221..ed80f54 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/AscendingRuns.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/AscendingRuns.java @@ -32,9 +32,4 @@ public class AscendingRuns extends IntegerSupplier { private AscendingRuns(Integer[] readonly) { super(readonly); } - - @Override - public String title() { - return "Array of Integer objects with ascending runs"; - } } diff --git a/app/src/main/java/de/uni_marburg/powersort/data/DescendingIntegers.java b/app/src/main/java/de/uni_marburg/powersort/data/DescendingIntegers.java index 70a8f15..d72745d 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/DescendingIntegers.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/DescendingIntegers.java @@ -1,15 +1,9 @@ package de.uni_marburg.powersort.data; import de.uni_marburg.powersort.benchmark.IntegerArray; -import de.uni_marburg.powersort.benchmark.LongFormatter; public class DescendingIntegers extends IntegerSupplier { public DescendingIntegers(int size) { super(IntegerArray.descending(size, 1)); } - - @Override - public String title() { - return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " descending Integer objects."; - } } diff --git a/app/src/main/java/de/uni_marburg/powersort/data/ObjectSupplier.java b/app/src/main/java/de/uni_marburg/powersort/data/ObjectSupplier.java index e1bd1c8..f4c1fa8 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/ObjectSupplier.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/ObjectSupplier.java @@ -9,11 +9,6 @@ public abstract class ObjectSupplier { this.readOnly = readOnly; } - /** - * Descriptive title for the array of objects represented by this object. - */ - public abstract String title(); - /** * @return A fresh copy of the array of objects represented by this object. */ diff --git a/app/src/main/java/de/uni_marburg/powersort/data/RandomIntegers.java b/app/src/main/java/de/uni_marburg/powersort/data/RandomIntegers.java index f7b85ee..6f0ff47 100644 --- a/app/src/main/java/de/uni_marburg/powersort/data/RandomIntegers.java +++ b/app/src/main/java/de/uni_marburg/powersort/data/RandomIntegers.java @@ -1,15 +1,9 @@ package de.uni_marburg.powersort.data; import de.uni_marburg.powersort.benchmark.IntegerArray; -import de.uni_marburg.powersort.benchmark.LongFormatter; public class RandomIntegers extends IntegerSupplier { public RandomIntegers(final int size, final long seed) { super(IntegerArray.random(size, seed)); } - - @Override - public String title() { - return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " random Integer objects."; - } }