|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.alg.QuickSort
An implementation of the Quick Sort algorithm.
References:
Introduction to Algorithms
Thomas H. Cormen, et al / Hardcover / Published 1990
Constructor Summary | |
QuickSort()
The compare object is not set. |
|
QuickSort(boolean descending)
If descending is true then the elements will be sorted in high-to-low order. |
|
QuickSort(boolean descending,
CompareI compare)
If descending is true then the elements will be sorted in high-to-low order. |
|
QuickSort(CompareI compare)
The compare object is set to 'compare'. |
Method Summary | |
CompareI |
getCompare()
Returns the comparison object. |
void |
setAscending()
Sets order to ascending. |
void |
setCompare(CompareI compare)
Sets the comparison object. |
void |
setDescending()
Sets order to descending. |
void |
sort(byte[] array)
Sort the array elements. |
void |
sort(byte[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(double[] array)
Sort the array elements. |
void |
sort(double[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(float[] array)
Sort the array elements. |
void |
sort(float[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(int[] array)
Sort the array elements. |
void |
sort(int[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(long[] array)
Sort the array elements. |
void |
sort(long[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(java.lang.Object[] array)
Sort the array elements. |
void |
sort(java.lang.Object[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(short[] array)
Sort the array elements. |
void |
sort(short[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(java.lang.String[] array)
Sort the array elements. |
void |
sort(java.lang.String[] array,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(java.util.Vector vector)
Sort the vector elements. |
void |
sort(VectorI vector)
Sort the vector elements. |
void |
sort(VectorI vector,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
void |
sort(java.util.Vector vector,
int from,
int to)
Sort the elements beginning with 'from' ending with 'to'. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public QuickSort()
public QuickSort(boolean descending)
public QuickSort(CompareI compare)
public QuickSort(boolean descending, CompareI compare)
Method Detail |
public void setCompare(CompareI compare)
public CompareI getCompare()
public void setDescending()
public void setAscending()
public void sort(java.util.Vector vector)
public void sort(java.util.Vector vector, int from, int to)
public void sort(java.lang.Object[] array)
public void sort(java.lang.Object[] array, int from, int to)
public void sort(long[] array)
public void sort(long[] array, int from, int to)
public void sort(int[] array)
public void sort(int[] array, int from, int to)
public void sort(double[] array)
public void sort(double[] array, int from, int to)
public void sort(java.lang.String[] array)
public void sort(java.lang.String[] array, int from, int to)
public void sort(VectorI vector)
public void sort(VectorI vector, int from, int to)
public void sort(short[] array)
public void sort(short[] array, int from, int to)
public void sort(byte[] array)
public void sort(byte[] array, int from, int to)
public void sort(float[] array)
public void sort(float[] array, int from, int to)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |