protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a,fromIndex,toIndex,c); } protected void runSort(int fromIndex, int toIndex, IntComparator c, cern.colt.Swapper swapper) {
protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a,fromIndex,toIndex,c); } protected void runSort(int fromIndex, int toIndex, IntComparator c, cern.colt.Swapper swapper) {
protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a,fromIndex,toIndex,c); } protected void runSort(int fromIndex, int toIndex, IntComparator c, cern.colt.Swapper swapper) {
protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a,fromIndex,toIndex,c); } protected void runSort(int fromIndex, int toIndex, IntComparator c, cern.colt.Swapper swapper) {
protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a, fromIndex, toIndex, c); }
protected void runSort(int[] a, int fromIndex, int toIndex, IntComparator c) { cern.colt.Sorting.quickSort(a, fromIndex, toIndex, c); }
/** * Sorts the specified range of the receiver into * ascending order, according to the <i>natural ordering</i> of its * elements. All elements in this range must implement the * <tt>Comparable</tt> interface. Furthermore, all elements in this range * must be <i>mutually comparable</i> (that is, <tt>e1.compareTo(e2)</tt> * must not throw a <tt>ClassCastException</tt> for any elements * <tt>e1</tt> and <tt>e2</tt> in the array).<p> * The sorting algorithm is a tuned quicksort, * adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a * Sort Function", Software-Practice and Experience, Vol. 23(11) * P. 1249-1265 (November 1993). This algorithm offers n*log(n) * performance on many data sets that cause other quicksorts to degrade to * quadratic performance. * * <p><b>You should never call this method unless you are sure that this particular sorting algorithm is the right one for your data set.</b> * It is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> instead, because those methods automatically choose the best sorting algorithm. * * @param from the index of the first element (inclusive) to be sorted. * @param to the index of the last element (inclusive) to be sorted. * @exception IndexOutOfBoundsException index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>). */ public void quickSortFromTo(int from, int to) { if (size==0) return; checkRangeFromTo(from, to, size); cern.colt.Sorting.quickSort(elements, from, to+1); } /**
/** * Sorts the specified range of the receiver into * ascending order, according to the <i>natural ordering</i> of its * elements. All elements in this range must implement the * <tt>Comparable</tt> interface. Furthermore, all elements in this range * must be <i>mutually comparable</i> (that is, <tt>e1.compareTo(e2)</tt> * must not throw a <tt>ClassCastException</tt> for any elements * <tt>e1</tt> and <tt>e2</tt> in the array).<p> * The sorting algorithm is a tuned quicksort, * adapted from Jon L. Bentley and M. Douglas McIlroy's "Engineering a * Sort Function", Software-Practice and Experience, Vol. 23(11) * P. 1249-1265 (November 1993). This algorithm offers n*log(n) * performance on many data sets that cause other quicksorts to degrade to * quadratic performance. * * <p><b>You should never call this method unless you are sure that this particular sorting algorithm is the right one for your data set.</b> * It is generally better to call <tt>sort()</tt> or <tt>sortFromTo(...)</tt> instead, because those methods automatically choose the best sorting algorithm. * * @param from the index of the first element (inclusive) to be sorted. * @param to the index of the last element (inclusive) to be sorted. * @exception IndexOutOfBoundsException index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>). */ public void quickSortFromTo(int from, int to) { if (size==0) return; checkRangeFromTo(from, to, size); cern.colt.Sorting.quickSort(elements, from, to+1); } /**
if (size==0) return; checkRangeFromTo(from, to, size); cern.colt.Sorting.quickSort(elements, from, to+1, c);
if (size==0) return; checkRangeFromTo(from, to, size); cern.colt.Sorting.quickSort(elements, from, to+1, c);
return; checkRangeFromTo(from, to, size); cern.colt.Sorting.quickSort(elements, from, to + 1, c);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);
cern.colt.Sorting.quickSort(myElements, from, to+1,c); elements(myElements); setSizeRaw(mySize);