X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FQuickSort.java;h=19ef7303b6b157cb8df43cafb7568ff02368a55d;hb=9876fdccf311378e690c1f9e18db52675d427b89;hp=4826bc3801b8083bf6e290c36af42a2ed9816f39;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/jalview/util/QuickSort.java b/src/jalview/util/QuickSort.java index 4826bc3..19ef730 100755 --- a/src/jalview/util/QuickSort.java +++ b/src/jalview/util/QuickSort.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) - * Copyright (C) $$Year-Rel$$ The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors * * This file is part of Jalview. * @@ -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 */