benchmark: rm ObjectSupplier.title

This commit is contained in:
Daniel Langbein 2024-12-17 08:28:09 +00:00
parent a782d8c1fa
commit c3ecfc5531
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
6 changed files with 1 additions and 29 deletions

View File

@ -17,7 +17,7 @@ public class Main {
for (DataEnum dataEnum : dataEnums) { for (DataEnum dataEnum : dataEnums) {
ObjectSupplier objectSupplier = dataEnum.get(); ObjectSupplier objectSupplier = dataEnum.get();
System.out.println("\n" + objectSupplier.title()); System.out.println(dataEnum);
for (SortEnum sortImplementation : sortImplementations) { for (SortEnum sortImplementation : sortImplementations) {
Object[] sortInput = objectSupplier.getCopy(); Object[] sortInput = objectSupplier.getCopy();

View File

@ -1,15 +1,9 @@
package de.uni_marburg.powersort.data; package de.uni_marburg.powersort.data;
import de.uni_marburg.powersort.benchmark.IntegerArray; import de.uni_marburg.powersort.benchmark.IntegerArray;
import de.uni_marburg.powersort.benchmark.LongFormatter;
public class AscendingIntegers extends IntegerSupplier { public class AscendingIntegers extends IntegerSupplier {
public AscendingIntegers(int size) { public AscendingIntegers(int size) {
super(IntegerArray.ascending( 1, size)); super(IntegerArray.ascending( 1, size));
} }
@Override
public String title() {
return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " ascending Integer objects.";
}
} }

View File

@ -32,9 +32,4 @@ public class AscendingRuns extends IntegerSupplier {
private AscendingRuns(Integer[] readonly) { private AscendingRuns(Integer[] readonly) {
super(readonly); super(readonly);
} }
@Override
public String title() {
return "Array of Integer objects with ascending runs";
}
} }

View File

@ -1,15 +1,9 @@
package de.uni_marburg.powersort.data; package de.uni_marburg.powersort.data;
import de.uni_marburg.powersort.benchmark.IntegerArray; import de.uni_marburg.powersort.benchmark.IntegerArray;
import de.uni_marburg.powersort.benchmark.LongFormatter;
public class DescendingIntegers extends IntegerSupplier { public class DescendingIntegers extends IntegerSupplier {
public DescendingIntegers(int size) { public DescendingIntegers(int size) {
super(IntegerArray.descending(size, 1)); super(IntegerArray.descending(size, 1));
} }
@Override
public String title() {
return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " descending Integer objects.";
}
} }

View File

@ -9,11 +9,6 @@ public abstract class ObjectSupplier {
this.readOnly = readOnly; 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. * @return A fresh copy of the array of objects represented by this object.
*/ */

View File

@ -1,15 +1,9 @@
package de.uni_marburg.powersort.data; package de.uni_marburg.powersort.data;
import de.uni_marburg.powersort.benchmark.IntegerArray; import de.uni_marburg.powersort.benchmark.IntegerArray;
import de.uni_marburg.powersort.benchmark.LongFormatter;
public class RandomIntegers extends IntegerSupplier { public class RandomIntegers extends IntegerSupplier {
public RandomIntegers(final int size, final long seed) { public RandomIntegers(final int size, final long seed) {
super(IntegerArray.random(size, seed)); super(IntegerArray.random(size, seed));
} }
@Override
public String title() {
return "Array of " + LongFormatter.formatUnderscore(readOnly.length) + " random Integer objects.";
}
} }