Refactor package structure and update visibility modifier.

Renamed packages to follow a consistent naming convention (`de.uni_marburg.powersort.msort`). Adjusted imports and references accordingly. Changed `MERGE_COST` visibility from private to protected for broader accessibility.
This commit is contained in:
M-H9 2024-12-11 11:55:31 +01:00
parent 3f35d9bbfe
commit d4fd68fa70
3 changed files with 8 additions and 12 deletions

2
.idea/misc.xml generated
View File

@ -3,5 +3,5 @@
<component name="FrameworkDetectionExcludesConfiguration"> <component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" /> <file type="web" url="file://$PROJECT_DIR$" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_X" project-jdk-name="23" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="23" project-jdk-type="JavaSDK" />
</project> </project>

View File

@ -1,14 +1,10 @@
package Mohammed_Implementations; package de.uni_marburg.powersort.msort;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
public class IMPL_M_1 { public class IMPL_M_1 {
@ -31,7 +27,7 @@ public class IMPL_M_1 {
* @param workLen usable size of work array * @param workLen usable size of work array
* @since 1.8 * @since 1.8
*/ */
private static int MERGE_COST = 0; protected static int MERGE_COST = 0;
// Example usage // Example usage
// int[] runs = new int[] {5, 3, 3, 14, 1, 2}; // example from slides // int[] runs = new int[] {5, 3, 3, 14, 1, 2}; // example from slides

View File

@ -1,4 +1,4 @@
package de.uni_marburg.powersort; package de.uni_marburg.powersort.msort;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -8,10 +8,10 @@ import java.util.stream.IntStream;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static Mohammed_Implementations.PowerSort.MERGE_COST; import static de.uni_marburg.powersort.msort.IMPL_M_1.MERGE_COST;
import static Mohammed_Implementations.PowerSort.extendRun; import static de.uni_marburg.powersort.msort.IMPL_M_1.extendRun;
import static Mohammed_Implementations.PowerSort.fillWithAscRunsHighToLow; import static de.uni_marburg.powersort.msort.IMPL_M_1.fillWithAscRunsHighToLow;
import static Mohammed_Implementations.PowerSort.powerSort; import static de.uni_marburg.powersort.msort.IMPL_M_1.powerSort;
class PowerSortTest { class PowerSortTest {
@Test @Test