X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FQuickSort.java;h=2b58095d1105fe4a153803715ffb140f520ae217;hb=9b3219d225131af5a165553f206ebf8da304ee23;hp=4826bc3801b8083bf6e290c36af42a2ed9816f39;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/jalview/util/QuickSort.java b/src/jalview/util/QuickSort.java index 4826bc3..2b58095 100755 --- a/src/jalview/util/QuickSort.java +++ b/src/jalview/util/QuickSort.java @@ -47,7 +47,7 @@ public class QuickSort { return Float.compare(values[o1], values[o2]); } - + } static class IntComparator implements Comparator @@ -492,13 +492,13 @@ public class QuickSort nextZeroValue++; } } - + /* * Copy zero values back to original arrays */ System.arraycopy(f1, 0, arr, 0, nextZeroValue); System.arraycopy(s1, 0, s, 0, nextZeroValue); - + if (nextZeroValue == arr.length) { return; // all zero @@ -506,12 +506,11 @@ public class QuickSort /* * Sort the non-zero values */ - int[] nonZeroInts = Arrays - .copyOfRange(f1, nextZeroValue, f1.length); + int[] nonZeroInts = Arrays.copyOfRange(f1, nextZeroValue, f1.length); char[] nonZeroChars = Arrays.copyOfRange(s1, nextZeroValue, s1.length); externalSort(nonZeroInts, nonZeroChars); // sort(nonZeroFloats, 0, nonZeroFloats.length - 1, nonZeroChars); - + /* * Assemble sorted non-zero results */