|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nz.ac.waikato.jdsl.core.algo.sorts.ArrayMergeSort
public class ArrayMergeSort
Performs a merge-sort in O(n log n) time, provided that the atRank(int) method of the Sequence works in O(1) time.
Constructor Summary | |
---|---|
ArrayMergeSort()
|
Method Summary | |
---|---|
void |
sort(Sequence S,
Comparator c)
Method that actually sorts the sequence, with the first element after the sort being the one that the comparator reported was smallest. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayMergeSort()
Method Detail |
---|
public void sort(Sequence S, Comparator c)
SortObject
sort
in interface SortObject
S
- sequence to be sortedc
- comparator which defines in which order S is sorted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |