|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdsl.core.algo.sorts.ListMergeSort
Performs a merge-sort in O(n log n) time, provided that isEmpty(), first(), insertLast(), and removeFirst() all operate in O(1) time.
Constructor Summary | |
ListMergeSort()
|
Method Summary | |
void |
sort(Sequence S,
Comparator c)
Recursively divides a Sequence into (roughly) equal subsequences and merges them back together once sorted. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ListMergeSort()
Method Detail |
public void sort(Sequence S, Comparator c)
sort
in interface SortObject
S
- the sequence to sortc
- the comparator to use in the sort
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |