Package nz.ac.waikato.jdsl.core.algo.sorts

Interface Summary
SortObject Algorithm interface for sorting a sequence according to a given comparator of elements.
 

Class Summary
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.
ArrayQuickSort Performs an in-place quicksort in expected O(n log n) time, provided that the atRank(int) method of the Sequence operates in O(1) time.
HeapSort Performs a heap-sort in O(n log n) time, provided only that the replaceElement(.) method of the Sequence works in O(1) time (and thus the style of implementation of the Sequence is not relevant).
ListMergeSort Performs a merge-sort in O(n log n) time, provided that isEmpty(), first(), insertLast(), and removeFirst() all operate in O(1) time.
 



Copyright © 2009 ModelJUnit Project. All Rights Reserved.