|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.utility.comparator.Sorter
public final class Sorter
Holds static methods to sort lists
| Method Summary | ||
|---|---|---|
static
|
mergeSort(E head,
java.util.Comparator<E> comp)
This is a generic merge sort algorithm, that sorts a linked list. |
|
static
|
quickSort(E[] a,
int lo0,
int hi0,
java.util.Comparator<E> comp)
This is a generic version of C.A.R Hoare's Quick Sort algorithm. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <E> void quickSort(E[] a,
int lo0,
int hi0,
java.util.Comparator<E> comp)
a - an object arraylo0 - left boundary of array partitionhi0 - right boundary of array partitioncomp - the comparator used
public static <E extends org.jagatoo.datatypes.Chainable<E>> E mergeSort(E head,
java.util.Comparator<E> comp)
E - the type of the elements to be sortedhead - the head of the linked listcomp - the Comparator to compare the elements
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||