From b0250b83faae21f6a9419f8bfff916cc854aed30 Mon Sep 17 00:00:00 2001 From: M-H9 Date: Tue, 10 Dec 2024 10:54:18 +0100 Subject: [PATCH 1/5] switched to my branch --- .vscode/settings.json | 3 +++ app/bin/main/de/uni_marburg/powersort/App.class | Bin 0 -> 700 bytes .../powersort/ComparableTimSort.class | Bin 0 -> 9818 bytes .../de/uni_marburg/powersort/PowerSort.class | Bin 0 -> 1652 bytes .../main/de/uni_marburg/powersort/TimSort.class | Bin 0 -> 10968 bytes .../test/de/uni_marburg/powersort/AppTest.class | Bin 0 -> 751 bytes 6 files changed, 3 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 app/bin/main/de/uni_marburg/powersort/App.class create mode 100644 app/bin/main/de/uni_marburg/powersort/ComparableTimSort.class create mode 100644 app/bin/main/de/uni_marburg/powersort/PowerSort.class create mode 100644 app/bin/main/de/uni_marburg/powersort/TimSort.class create mode 100644 app/bin/test/de/uni_marburg/powersort/AppTest.class diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7b016a8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/app/bin/main/de/uni_marburg/powersort/App.class b/app/bin/main/de/uni_marburg/powersort/App.class new file mode 100644 index 0000000000000000000000000000000000000000..2c43fac1548bca0ebe71dd1f7f98c27aee63f344 GIT binary patch literal 700 zcmaKp?MfR_5Qg6|(M{G>^I@#E)~;1+QqaACl$Ih`D4`Wn0@5GlY&@(-vb*8rY{k2( z{!mcx0=y`3PE3iS_~)IS+4*?p%+2lPHGmy#I+!3VAIKm})Sp=BFw;@cPmiS@q}l{u z`+Wy_Lg`5S6+urVQSdW7l3hcX`lJ$NJ`-~FMu(8!Ne`rp9Eu($F-4ebsYL$B;!x^e zBJ4>*rImI?uOqaw{wSC?hiX7rX}!eIBuq!reA7}Il|+R3dZRT)Y8%bbW&vf}NSe)o zAKHk&_kR)Jr2cnaVU9q|)Yp8+Pg z?KIO}xvT687x-S=b`-Z}Qa&+Q$sUB&VJ~1yY$rcnpm53`6L4AWZ>!U+-hBew8TQC7 z!fK1R*xI~YrSy-@!_vZo(%h)DhzhEs(l0{}pnQh;E71N0UZ3O5Io^<yAKmmw4`& Pql`7IbDXd-9Qol6`md0` literal 0 HcmV?d00001 diff --git a/app/bin/main/de/uni_marburg/powersort/ComparableTimSort.class b/app/bin/main/de/uni_marburg/powersort/ComparableTimSort.class new file mode 100644 index 0000000000000000000000000000000000000000..9f7d58fb15f9a65057ccc57b54766ea52cf8f15c GIT binary patch literal 9818 zcmbta3wV^(nSReX|3Cj^WPoHfhACWL*m9nZCfJKTDy474XKu#K*_>}MXMLiTRMN9fM^gX zo!gP=$|W+n<%zcLl;UDF>_`XT}<^t%oxY)@zAC)(ONIt8j5 z7BwtusBc`oY~hmCP0JQ9t)D+{b>qB6^Os%0w>d9VuAT2W{GF5NN(uN_YfNQ04TWe~ z-;}$=AB{V5?x)XY%WcaFH3jn-6lEdDgpnDmbP>zotwoK#!px- zV9o7FrUHm!w1ZIsWrJIp+r~*ksKFS4%4Di5olPa{3)42`61na!Gs&tFihEuNBQTQV z8`GK8qVD!Jsq8YntUyI$M@yn@c_N!OO7|K|Ilg86!bE5OCEtv^P!q?WL!0MlYG|0S zJOG7Q2@zQ$?Z^f&AF%*8bY%#QSjab9I=VBtrQMnOOmbmjeX72z zC6!60Gp+18_qr1r^!UXgEWuR-^_p}hk-b^FjX>48M;OBhG-<<(*MqMPVL4U^gouAG z&Hc9K)^We%8@$O^hOi3P63m_5UF-OQfIZ$bufX*od>qwuzV=kMH8r=Rtu4{nMYswy zhmg=c6{hF%j%>?7w}5Qx;Lo}=CC)5OwI>KJy~ltCnI{6fb2P2blZi{N)iXG_L16fx zItR%jh&0+lXovQ|7Q-Q_Wn9D^f41}MZFM5+;1j12OViC=xm0@yUC`{3$Yv8aw{&#g zOtL!191Ukrt93#_2^y_^yEA=b2g}N$7YD`FF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$JBg0sTSZF zbuNCY&ckn2Esm(g_(&}gLe+_YI$z|gr6Q#2#VFMv#;6NLL@g7O)kWe|RU>AqMp36? zqFJpF3DqPzRI|8B#l?EHQrxOq#OKv2afiBG>`|-5S5>QcNF~J!s$G0vb&y@J5QkKX z%-SjbqSE59>JlHStH`Kpx@Agjl55mvd84|4411&8rf!lu)Xj1y%RTBda=*G&zMyWCZ>Y~1_Wh#A8(H=} zlx5#TS@u1YW#27e!Wc5ziPyB0hq%LPt#RY@*%aCzp;gAyj`I-OaAbSe?0V=5AI}BL* zZh0{o?z~VB7Rb;6{BZr;ZYjcdBM_R~iz0pbc-qs}`U7}P-&~#MeYz!2>MyrTypObD zex3C`-adjw4^g0ZyI!Twu4+31>K+uS9Vk&dF;!jvMe$mLDj%z3wsS*w(wF@l}Pb$+PSe&wCd}2rE^>uzy)7D`#RLb4i#z zrL^T%YDJKTv8H~e)SM-mNh?gmGa0$2x*pn;@l;J8E!3UZ39yT242?wCW##S8X}lcD zl{LhtTf;uX0kI78i7wJ{IN>)UVZvR5- t>n*n8w?DDn-n+xW616#}&_Io_T7>4%cNecp^csAk`igMrM^UtblfP|bw=Mtx literal 0 HcmV?d00001 From e40a430a11e37dc1a95c4ed15c24942962f857be Mon Sep 17 00:00:00 2001 From: M-H9 Date: Tue, 10 Dec 2024 10:46:40 +0100 Subject: [PATCH 2/5] first Powersort successful implementation, Translation of the notebook. --- .idea/misc.xml | 4 +- .../java/de/uni_marburg/powersort/App.java | 8 + .../de/uni_marburg/powersort/PowerSort.java | 229 +++++++++++++++++- 3 files changed, 236 insertions(+), 5 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index a29a496..baddb10 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - - + + \ No newline at end of file diff --git a/app/src/main/java/de/uni_marburg/powersort/App.java b/app/src/main/java/de/uni_marburg/powersort/App.java index 23e9332..fc8aa9e 100644 --- a/app/src/main/java/de/uni_marburg/powersort/App.java +++ b/app/src/main/java/de/uni_marburg/powersort/App.java @@ -3,6 +3,11 @@ */ package de.uni_marburg.powersort; +import java.util.ArrayList; +import java.util.List; + +import static de.uni_marburg.powersort.PowerSort.extendRun; + public class App { public String getGreeting() { return "Let's bring Powersort to Java!"; @@ -10,5 +15,8 @@ public class App { public static void main(String[] args) { System.out.println(new App().getGreeting()); + List list = new ArrayList<>(List.of(5, 2, 8, 12, 1, 6)); + extendRun(list, 0); + System.out.println(list); } } diff --git a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java b/app/src/main/java/de/uni_marburg/powersort/PowerSort.java index 7c7f5fc..2152d71 100644 --- a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/PowerSort.java @@ -1,6 +1,8 @@ package de.uni_marburg.powersort; -import java.util.Comparator; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; class PowerSort { /** @@ -19,8 +21,229 @@ class PowerSort { * @param workLen usable size of work array * @since 1.8 */ - static void sort(T[] a, int lo, int hi, Comparator c, + private static int MERGE_COST = 0; + + private static List merge(List run1, List run2) { + List result = new ArrayList<>(); + while (!run1.isEmpty() && !run2.isEmpty()) { + if (run1.get(0) < run2.get(0)) { + result.add(run1.remove(0)); + } else { + result.add(run2.remove(0)); + } + } + result.addAll(run1); + result.addAll(run2); + return result; + } + + private static void mergeInplace(List a, int i, int m, int j) { + System.out.printf("Merge(%d, %d, %d)%n", i, m, j); + MERGE_COST += j - i; + List sublist = merge( + new ArrayList<>(a.subList(i, m)), + new ArrayList<>(a.subList(m, j)) + ); + for (int k = 0; k < sublist.size(); k++) { + a.set(i + k, sublist.get(k)); + } + } + + static int extendRun(List a, int i) { + if (i == a.size() - 1) { + return i + 1; + } + int j = i + 1; + if (a.get(i) <= a.get(j)) { + while (j < a.size() && a.get(j - 1) <= a.get(j)) { + j++; + } + } else { + while (j < a.size() && a.get(j - 1) > a.get(j)) { + j++; + } + List sublist = a.subList(i, j); + Collections.reverse(sublist); + } + return j; + } + + private static int extendRunIncreasingOnly(List a, int i) { + if (i == a.size() - 1) { + return i + 1; + } + int j = i + 1; + while (j < a.size() && a.get(j - 1) <= a.get(j)) { + j++; + } + return j; + } + + public static int power(int[] run1, int[] run2, int n) { + int i1 = run1[0], n1 = run1[1]; + int i2 = run2[0], n2 = run2[1]; + + assert i1 >= 0; + assert i2 == i1 + n1; + assert n1 >= 1 && n2 >= 1; + assert i2 + n2 <= n; +// ask question about this whether it should be double or int + int a = (int) ((i1 + n1 / 2.0) / n); + int b = (int) ((i2 + n2 / 2.0) / n); + + int l = 0; + while (Math.floor(a * Math.pow(2, l)) == Math.floor(b * Math.pow(2, l))) { + l++; + } + return l; + } + + public static int powerFast(int[] run1, int[] run2, int n) { + int i1 = run1[0], n1 = run1[1]; + int i2 = run2[0], n2 = run2[1]; + + int a = 2 * i1 + n1; + int b = a + n1 + n2; + + int l = 0; + while (true) { + l++; + if (a >= n) { + assert b >= a; + a -= n; + b -= n; + } else if (b >= n) { + break; + } + assert a < b && b < n; + a <<= 1; + b <<= 1; + } + return l; + } + + public static void mergeTopmost2(List a, List runs) { + assert runs.size() >= 2; +// is this right? + int[] Y = runs.get(runs.size() - 2); + int[] Z = runs.get(runs.size() - 1); + + assert Z[0] == Y[0] + Y[1]; + + mergeInplace(a, Y[0], Z[0], Z[0] + Z[1]); + + runs.set(runs.size() - 2, new int[]{Y[0], Y[1] + Z[1], Y[2]}); + runs.remove(runs.size() - 1); + } + + public static void powerSort(List a) { + int n = a.size(); + int i = 0; + List runs = new ArrayList<>(); + + int j = extendRun(a, i); + runs.add(new int[]{i, j - i, 0}); + i = j; + + while (i < n) { + j = extendRun(a, i); + int p = power(runs.get(runs.size() - 1), new int[]{i, j - i}, n); + + while (p <= runs.get(runs.size() - 1)[2]) { + mergeTopmost2(a, runs); + } + + runs.add(new int[]{i, j - i, p}); + i = j; + } + + while (runs.size() >= 2) { + mergeTopmost2(a, runs); + } + } + } + +// // Example usage +// public static void main(String[] args) { +// List list = new ArrayList<>(List.of(5, 2, 8, 12, 1, 6)); +// extendRun(list, 0); +// System.out.println(list); +// } + + + + /* static void sort(T[] a, int lo, int hi, Comparator c, T[] work, int workBase, int workLen) { assert c != null && a != null && lo >= 0 && lo <= hi && hi <= a.length; + }*/ +/* + public static final int MIN_MERGE=24; + public int mergeCost=0; + private final T []sortedArray; + + public PowerSort(T[] sortedArray) { + super(); + this.sortedArray = sortedArray; } -} \ No newline at end of file + + ArrayList run1 = new ArrayList<>(); + ArrayList run2 = new ArrayList<>(); + + private AbstractList merge(ArrayList run1, ArrayList run2) { + ArrayList result = new ArrayList<>(); + + while(run1.size() > 0 && run2.size() >0) { + if (run1.getFirst() Date: Tue, 10 Dec 2024 18:12:08 +0100 Subject: [PATCH 3/5] Created my branch folder for the merge --- .../Mohammed_Implementations/IMPL_M_1.java | 302 ++++++++++++++++++ .../java/de/uni_marburg/powersort/App.java | 22 -- .../de/uni_marburg/powersort/PowerSort.java | 229 +------------ .../de/uni_marburg/powersort/AppTest.java | 14 - .../uni_marburg/powersort/PowerSortTest.java | 37 +++ 5 files changed, 342 insertions(+), 262 deletions(-) create mode 100644 app/src/main/java/Mohammed_Implementations/IMPL_M_1.java delete mode 100644 app/src/main/java/de/uni_marburg/powersort/App.java delete mode 100644 app/src/test/java/de/uni_marburg/powersort/AppTest.java create mode 100644 app/src/test/java/de/uni_marburg/powersort/PowerSortTest.java diff --git a/app/src/main/java/Mohammed_Implementations/IMPL_M_1.java b/app/src/main/java/Mohammed_Implementations/IMPL_M_1.java new file mode 100644 index 0000000..03c69d6 --- /dev/null +++ b/app/src/main/java/Mohammed_Implementations/IMPL_M_1.java @@ -0,0 +1,302 @@ +package Mohammed_Implementations; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +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 { + + + + private IMPL_M_1() {} + + /** + * Sorts the given range, using the given workspace array slice + * for temp storage when possible. This method is designed to be + * invoked from public methods (in class Arrays) after performing + * any necessary array bounds checks and expanding parameters into + * the required forms. + * + * @param a the array to be sorted + * @param lo the index of the first element, inclusive, to be sorted + * @param hi the index of the last element, exclusive, to be sorted + * @param c the comparator to use + * @param work a workspace array (slice) + * @param workBase origin of usable space in work array + * @param workLen usable size of work array + * @since 1.8 + */ + private static int MERGE_COST = 0; + + // Example usage +// int[] runs = new int[] {5, 3, 3, 14, 1, 2}; // example from slides +// //runs = new int[]{9, 16, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; +// +// ArrayList a = new ArrayList<>(IntStream.range(0, Arrays.stream(runs).sum()).boxed().collect(Collectors.toList())); +// +// System.out.println(); +// fillWithAscRunsHighToLow(a, runs); +// MERGE_COST = 0; +// System.out.println("Sorting with Powersort:"); +// powersort(a, this::extendRunIncreasingOnly); +// System.out.println("Merge cost: " + MERGE_COST); + +// runs = [5,3,3,14,1,2]; +// runs = [9,16,7,7,7,7,7,7,7,7,7,7]; +// +// a = list(range(sum(runs))); +// fill_with_asc_runs_high_to_low(a, runs); +// MERGE_COST = 0; +// System.out.println("Sorting with Powersort:"); +// powersort(a, extendRunIncreasingOnly); +// System.out.println("Merge cost: " + MERGE_COST); + + + public static void fillWithAscRunsHighToLow(List A, int[] runLengths, int runLenFactor) { + int n = A.size(); + assert IntStream.of(runLengths).sum() * runLenFactor == n; + + for (int i = 0; i < n; i++) { + A.set(i, n - i); + } + + int i = 0; + for (int l : runLengths) { + int L = l * runLenFactor; + List sublist = A.subList(i, i + L); + Collections.sort(sublist); + i += L; + } + } + + private static List merge(List run1, List run2) { + List result = new ArrayList<>(); + while (!run1.isEmpty() && !run2.isEmpty()) { + if (run1.get(0) < run2.get(0)) { + result.add(run1.remove(0)); + } else { + result.add(run2.remove(0)); + } + } + result.addAll(run1); + result.addAll(run2); + return result; + } + + private static void mergeInplace(List a, int i, int m, int j) { + System.out.printf("Merge(%d, %d, %d)%n", i, m, j); + MERGE_COST += j - i; + List sublist = merge( + new ArrayList<>(a.subList(i, m)), + new ArrayList<>(a.subList(m, j)) + ); + for (int k = 0; k < sublist.size(); k++) { + a.set(i + k, sublist.get(k)); + } + } + + static int extendRun(List a, int i) { + if (i == a.size() - 1) { + return i + 1; + } + int j = i + 1; + if (a.get(i) <= a.get(j)) { + while (j < a.size() && a.get(j - 1) <= a.get(j)) { + j++; + } + } else { + while (j < a.size() && a.get(j - 1) > a.get(j)) { + j++; + } + List sublist = a.subList(i, j); + Collections.reverse(sublist); + } + return j; + } + + private static int extendRunIncreasingOnly(List a, int i) { + if (i == a.size() - 1) { + return i + 1; + } + int j = i + 1; + while (j < a.size() && a.get(j - 1) <= a.get(j)) { + j++; + } + return j; + } + + public static int power(int[] run1, int[] run2, int n) { + int i1 = run1[0], n1 = run1[1]; + int i2 = run2[0], n2 = run2[1]; + + assert i1 >= 0; + assert i2 == i1 + n1; + assert n1 >= 1 && n2 >= 1; + assert i2 + n2 <= n; + + double a = ((i1 + n1 / 2.0d) / n); + double b = ((i2 + n2 / 2.0d) / n); + + int l = 0; + while (Math.floor(a * Math.pow(2, l)) == Math.floor(b * Math.pow(2, l))) { + l++; + } + return l; + } + + public static int powerFast(int[] run1, int[] run2, int n) { + int i1 = run1[0], n1 = run1[1]; + int i2 = run2[0], n2 = run2[1]; + + int a = 2 * i1 + n1; + int b = a + n1 + n2; + + int l = 0; + while (true) { + l++; + if (a >= n) { + assert b >= a; + a -= n; + b -= n; + } else if (b >= n) { + break; + } + assert a < b && b < n; + a <<= 1; + b <<= 1; + } + return l; + } + + public static void mergeTopmost2(List a, List runs) { + assert runs.size() >= 2; + + int[] Y = runs.get(runs.size() - 2); + int[] Z = runs.get(runs.size() - 1); + + assert Z[0] == Y[0] + Y[1]; + + mergeInplace(a, Y[0], Z[0], Z[0] + Z[1]); + + runs.set(runs.size() - 2, new int[] {Y[0], Y[1] + Z[1], Y[2]}); + runs.remove(runs.size() - 1); + } + + public static void powerSort(List a) { + int n = a.size(); + int i = 0; + List runs = new ArrayList<>(); + + int j = extendRun(a, i); + runs.add(new int[] {i, j - i, 0}); + i = j; + + while (i < n) { + j = extendRun(a, i); + int p = power(runs.get(runs.size() - 1), new int[] {i, j - i}, n); + + while (p <= runs.get(runs.size() - 1)[2]) { + mergeTopmost2(a, runs); + } + + runs.add(new int[] {i, j - i, p}); + i = j; + } + + while (runs.size() >= 2) { + mergeTopmost2(a, runs); + } + } + + /* """Fills the given array A with ascending runs of the given list of run + lengths. + More precisely, the array is first filled n, n-1, ..., 1 + and then for i=0..l-1 segments of runLengths.get(i) * runLenFactor + are sorted ascending. + The sum of all lengths in runLengths times runLenFactor should be equal to the + length of A. + """*/ + + + /* static void sort(T[] a, int lo, int hi, Comparator c, + T[] work, int workBase, int workLen) { + assert c != null && a != null && lo >= 0 && lo <= hi && hi <= a.length; + }*/ +/* + public static final int MIN_MERGE=24; + public int mergeCost=0; + private final T []sortedArray; + + public PowerSort(T[] sortedArray) { + super(); + this.sortedArray = sortedArray; + } + + ArrayList run1 = new ArrayList<>(); + ArrayList run2 = new ArrayList<>(); + + private AbstractList merge(ArrayList run1, ArrayList run2) { + ArrayList result = new ArrayList<>(); + + while(run1.size() > 0 && run2.size() >0) { + if (run1.getFirst() list = new ArrayList<>(List.of(5, 2, 8, 12, 1, 6)); - extendRun(list, 0); - System.out.println(list); - } -} diff --git a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java b/app/src/main/java/de/uni_marburg/powersort/PowerSort.java index 2152d71..39916ad 100644 --- a/app/src/main/java/de/uni_marburg/powersort/PowerSort.java +++ b/app/src/main/java/de/uni_marburg/powersort/PowerSort.java @@ -1,8 +1,6 @@ package de.uni_marburg.powersort; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; +import java.util.Comparator; class PowerSort { /** @@ -21,229 +19,8 @@ class PowerSort { * @param workLen usable size of work array * @since 1.8 */ - private static int MERGE_COST = 0; - - private static List merge(List run1, List run2) { - List result = new ArrayList<>(); - while (!run1.isEmpty() && !run2.isEmpty()) { - if (run1.get(0) < run2.get(0)) { - result.add(run1.remove(0)); - } else { - result.add(run2.remove(0)); - } - } - result.addAll(run1); - result.addAll(run2); - return result; - } - - private static void mergeInplace(List a, int i, int m, int j) { - System.out.printf("Merge(%d, %d, %d)%n", i, m, j); - MERGE_COST += j - i; - List sublist = merge( - new ArrayList<>(a.subList(i, m)), - new ArrayList<>(a.subList(m, j)) - ); - for (int k = 0; k < sublist.size(); k++) { - a.set(i + k, sublist.get(k)); - } - } - - static int extendRun(List a, int i) { - if (i == a.size() - 1) { - return i + 1; - } - int j = i + 1; - if (a.get(i) <= a.get(j)) { - while (j < a.size() && a.get(j - 1) <= a.get(j)) { - j++; - } - } else { - while (j < a.size() && a.get(j - 1) > a.get(j)) { - j++; - } - List sublist = a.subList(i, j); - Collections.reverse(sublist); - } - return j; - } - - private static int extendRunIncreasingOnly(List a, int i) { - if (i == a.size() - 1) { - return i + 1; - } - int j = i + 1; - while (j < a.size() && a.get(j - 1) <= a.get(j)) { - j++; - } - return j; - } - - public static int power(int[] run1, int[] run2, int n) { - int i1 = run1[0], n1 = run1[1]; - int i2 = run2[0], n2 = run2[1]; - - assert i1 >= 0; - assert i2 == i1 + n1; - assert n1 >= 1 && n2 >= 1; - assert i2 + n2 <= n; -// ask question about this whether it should be double or int - int a = (int) ((i1 + n1 / 2.0) / n); - int b = (int) ((i2 + n2 / 2.0) / n); - - int l = 0; - while (Math.floor(a * Math.pow(2, l)) == Math.floor(b * Math.pow(2, l))) { - l++; - } - return l; - } - - public static int powerFast(int[] run1, int[] run2, int n) { - int i1 = run1[0], n1 = run1[1]; - int i2 = run2[0], n2 = run2[1]; - - int a = 2 * i1 + n1; - int b = a + n1 + n2; - - int l = 0; - while (true) { - l++; - if (a >= n) { - assert b >= a; - a -= n; - b -= n; - } else if (b >= n) { - break; - } - assert a < b && b < n; - a <<= 1; - b <<= 1; - } - return l; - } - - public static void mergeTopmost2(List a, List runs) { - assert runs.size() >= 2; -// is this right? - int[] Y = runs.get(runs.size() - 2); - int[] Z = runs.get(runs.size() - 1); - - assert Z[0] == Y[0] + Y[1]; - - mergeInplace(a, Y[0], Z[0], Z[0] + Z[1]); - - runs.set(runs.size() - 2, new int[]{Y[0], Y[1] + Z[1], Y[2]}); - runs.remove(runs.size() - 1); - } - - public static void powerSort(List a) { - int n = a.size(); - int i = 0; - List runs = new ArrayList<>(); - - int j = extendRun(a, i); - runs.add(new int[]{i, j - i, 0}); - i = j; - - while (i < n) { - j = extendRun(a, i); - int p = power(runs.get(runs.size() - 1), new int[]{i, j - i}, n); - - while (p <= runs.get(runs.size() - 1)[2]) { - mergeTopmost2(a, runs); - } - - runs.add(new int[]{i, j - i, p}); - i = j; - } - - while (runs.size() >= 2) { - mergeTopmost2(a, runs); - } - } - } - -// // Example usage -// public static void main(String[] args) { -// List list = new ArrayList<>(List.of(5, 2, 8, 12, 1, 6)); -// extendRun(list, 0); -// System.out.println(list); -// } - - - - /* static void sort(T[] a, int lo, int hi, Comparator c, + static void sort(T[] a, int lo, int hi, Comparator c, T[] work, int workBase, int workLen) { assert c != null && a != null && lo >= 0 && lo <= hi && hi <= a.length; - }*/ -/* - public static final int MIN_MERGE=24; - public int mergeCost=0; - private final T []sortedArray; - - public PowerSort(T[] sortedArray) { - super(); - this.sortedArray = sortedArray; } - - ArrayList run1 = new ArrayList<>(); - ArrayList run2 = new ArrayList<>(); - - private AbstractList merge(ArrayList run1, ArrayList run2) { - ArrayList result = new ArrayList<>(); - - while(run1.size() > 0 && run2.size() >0) { - if (run1.getFirst() list = new ArrayList<>(List.of(5, 2, 8, 12, 1, 6)); + extendRun(list, 0); + System.out.println(list); + // example from slides he wrote this + int[] runs = {5, 3, 3, 14, 1, 2}; + // runs = new int[]{9, 16, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}; + + List a = new ArrayList<>(IntStream.range(0, Arrays.stream(runs).sum()).boxed().collect(Collectors.toList())); + + System.out.println(); + fillWithAscRunsHighToLow(a, runs, 1); + MERGE_COST = 0; + System.out.println("Sorting with Powersort:"); + powerSort(a); + System.out.println("Merge cost: " + MERGE_COST); + } + + } \ No newline at end of file From d4fd68fa70fa0be78c4b6153ec327eda0cab113f Mon Sep 17 00:00:00 2001 From: M-H9 Date: Wed, 11 Dec 2024 11:55:31 +0100 Subject: [PATCH 4/5] 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. --- .idea/misc.xml | 2 +- .../uni_marburg/powersort/msort}/IMPL_M_1.java | 8 ++------ .../powersort/{ => msort}/PowerSortTest.java | 10 +++++----- 3 files changed, 8 insertions(+), 12 deletions(-) rename app/src/main/java/{Mohammed_Implementations => de/uni_marburg/powersort/msort}/IMPL_M_1.java (97%) rename app/src/test/java/de/uni_marburg/powersort/{ => msort}/PowerSortTest.java (74%) diff --git a/.idea/misc.xml b/.idea/misc.xml index baddb10..122ba17 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/app/src/main/java/Mohammed_Implementations/IMPL_M_1.java b/app/src/main/java/de/uni_marburg/powersort/msort/IMPL_M_1.java similarity index 97% rename from app/src/main/java/Mohammed_Implementations/IMPL_M_1.java rename to app/src/main/java/de/uni_marburg/powersort/msort/IMPL_M_1.java index 03c69d6..0d0f25d 100644 --- a/app/src/main/java/Mohammed_Implementations/IMPL_M_1.java +++ b/app/src/main/java/de/uni_marburg/powersort/msort/IMPL_M_1.java @@ -1,14 +1,10 @@ -package Mohammed_Implementations; +package de.uni_marburg.powersort.msort; import java.util.ArrayList; import java.util.Collections; import java.util.List; 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 { @@ -31,7 +27,7 @@ public class IMPL_M_1 { * @param workLen usable size of work array * @since 1.8 */ - private static int MERGE_COST = 0; + protected static int MERGE_COST = 0; // Example usage // int[] runs = new int[] {5, 3, 3, 14, 1, 2}; // example from slides diff --git a/app/src/test/java/de/uni_marburg/powersort/PowerSortTest.java b/app/src/test/java/de/uni_marburg/powersort/msort/PowerSortTest.java similarity index 74% rename from app/src/test/java/de/uni_marburg/powersort/PowerSortTest.java rename to app/src/test/java/de/uni_marburg/powersort/msort/PowerSortTest.java index 7c466ef..dc2bfa5 100644 --- a/app/src/test/java/de/uni_marburg/powersort/PowerSortTest.java +++ b/app/src/test/java/de/uni_marburg/powersort/msort/PowerSortTest.java @@ -1,4 +1,4 @@ -package de.uni_marburg.powersort; +package de.uni_marburg.powersort.msort; import java.util.ArrayList; import java.util.Arrays; @@ -8,10 +8,10 @@ import java.util.stream.IntStream; import org.junit.jupiter.api.Test; -import static Mohammed_Implementations.PowerSort.MERGE_COST; -import static Mohammed_Implementations.PowerSort.extendRun; -import static Mohammed_Implementations.PowerSort.fillWithAscRunsHighToLow; -import static Mohammed_Implementations.PowerSort.powerSort; +import static de.uni_marburg.powersort.msort.IMPL_M_1.MERGE_COST; +import static de.uni_marburg.powersort.msort.IMPL_M_1.extendRun; +import static de.uni_marburg.powersort.msort.IMPL_M_1.fillWithAscRunsHighToLow; +import static de.uni_marburg.powersort.msort.IMPL_M_1.powerSort; class PowerSortTest { @Test From 18c27e2ea05c07f519939411f6819664716b9d9a Mon Sep 17 00:00:00 2001 From: M-H9 Date: Wed, 11 Dec 2024 12:00:37 +0100 Subject: [PATCH 5/5] Remove .vscode/settings.json from the repository The file likely contained editor-specific configurations that are unrelated to the source code. Removing it helps prevent unintentional overrides of personal developer settings and keeps the repository cleaner. --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7b016a8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "java.compile.nullAnalysis.mode": "automatic" -} \ No newline at end of file