com.jaxfront.core.util.sort
Class FastQSort
java.lang.Object
com.jaxfront.core.util.sort.FastQSort
public class FastQSort
- extends java.lang.Object
A quick sort demonstration algorithm SortAlgorithm.java
- Version:
- @(#)QSortAlgorithm.java 1.3, 29 Feb 1996 extended with TriMedian and
InsertionSort by Denis Ahrens with all the tips from Robert
Sedgewick (Algorithms in C++). It uses TriMedian and InsertionSort
for lists shorts than 4.
- Author:
- James Gosling, Kevin A. Smith
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ASC
public static final int ASC
- See Also:
- Constant Field Values
DES
public static final int DES
- See Also:
- Constant Field Values
NATURAL
public static final int NATURAL
- See Also:
- Constant Field Values
FastQSort
public FastQSort()
sort
public int[] sort(java.util.List a,
java.util.Comparator comparator)
throws java.lang.Exception
- Throws:
java.lang.Exception
sort
public int[] sort(java.util.List a,
java.util.Comparator comparator,
int direction)
throws java.lang.Exception
- Throws:
java.lang.Exception
sort
public int[] sort(java.util.List a,
int[] indexList,
java.util.Comparator comparator)
throws java.lang.Exception
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
getStringComparator
public static java.util.Comparator getStringComparator()
getStringCaseInsensitiveComparator
public static java.util.Comparator getStringCaseInsensitiveComparator()
getTypeComparator
public static java.util.Comparator getTypeComparator()
getNumberCompare
public static java.util.Comparator getNumberCompare()