|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--Opus5.AbstractSorter
|
+--Opus5.AbstractQuickSorter
|
+--Opus5.MedianOfThreeQuickSorter
Sorter for sorting an array of Comparable objects.
Implements quicksort using median-of-three pivot selection.
Comparable| Fields inherited from class Opus5.AbstractQuickSorter |
cutOff |
| Fields inherited from class Opus5.AbstractSorter |
array, n |
| Fields inherited from interface Opus5.Sorter |
copyright |
| Constructor Summary | |
MedianOfThreeQuickSorter()
|
|
| Method Summary | |
protected int |
selectPivot(int left,
int right)
Selects an element in the specified range of the array to serve as the pivot. |
| Methods inherited from class Opus5.AbstractQuickSorter |
sort, sort |
| Methods inherited from class Opus5.AbstractSorter |
sort, swap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MedianOfThreeQuickSorter()
| Method Detail |
protected int selectPivot(int left,
int right)
selectPivot in class AbstractQuickSorterleft - The leftmost element of the range to consider.right - The rightmost element of the range to consider.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||