X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FQuickSort.java;h=0c0fabfb9c11f8b3e80e7306f3e7a0669f62a312;hb=3d0101179759ef157b088ea135423cd909512d9f;hp=62fd56eb7629d939895314abc343796be9783466;hpb=7c70cb09e9de68ab567e38520d6d09f0c17a3939;p=jalview.git diff --git a/src/jalview/util/QuickSort.java b/src/jalview/util/QuickSort.java index 62fd56e..0c0fabf 100755 --- a/src/jalview/util/QuickSort.java +++ b/src/jalview/util/QuickSort.java @@ -51,8 +51,8 @@ public class QuickSort @Override public int compare(Integer o1, Integer o2) { - return ascending ? Float.compare(values[o1], values[o2]) : Float - .compare(values[o2], values[o1]); + return ascending ? Float.compare(values[o1], values[o2]) + : Float.compare(values[o2], values[o1]); } } @@ -105,8 +105,8 @@ public class QuickSort @Override public int compare(Integer o1, Integer o2) { - return ascending ? Integer.compare(values[o1], values[o2]) : Integer - .compare(values[o2], values[o1]); + return ascending ? Integer.compare(values[o1], values[o2]) + : Integer.compare(values[o2], values[o1]); } } @@ -129,8 +129,8 @@ public class QuickSort @Override public int compare(Integer o1, Integer o2) { - return ascending ? values[o1].compareTo(values[o2]) : values[o2] - .compareTo(values[o1]); + return ascending ? values[o1].compareTo(values[o2]) + : values[o2].compareTo(values[o1]); } } @@ -475,10 +475,10 @@ public class QuickSort /* * Copy sorted positive values after the negatives and zeros */ - System.arraycopy(nonZeroFloats, negativeCount, arr, negativeCount - + zerosCount, positiveCount); - System.arraycopy(nonZeroChars, negativeCount, s, negativeCount - + zerosCount, positiveCount); + System.arraycopy(nonZeroFloats, negativeCount, arr, + negativeCount + zerosCount, positiveCount); + System.arraycopy(nonZeroChars, negativeCount, s, + negativeCount + zerosCount, positiveCount); } /** @@ -613,10 +613,10 @@ public class QuickSort /* * Copy sorted positive values after the negatives and zeros */ - System.arraycopy(nonZeroInts, negativeCount, arr, negativeCount - + zerosCount, positiveCount); - System.arraycopy(nonZeroChars, negativeCount, s, negativeCount - + zerosCount, positiveCount); + System.arraycopy(nonZeroInts, negativeCount, arr, + negativeCount + zerosCount, positiveCount); + System.arraycopy(nonZeroChars, negativeCount, s, + negativeCount + zerosCount, positiveCount); } /**