|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.util.Sort
Various sorting algorithms.
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Mar 29 1997, KT Created class - GUIRLib-v1.0-1.0.1, Nov 29 1997, JH Added bidirectional bubble sort Modified to allow sorting of Objects - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH Touched for GUIRLib release - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH Touched for GUIRLib release - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH Touched for GUIRLib release
Constructor Summary | |
Sort()
|
Method Summary | |
static long |
bidirBubbleSort(int[] theArray)
Performs a bidirectional "bubble" sort on theArray passed in. |
static long |
bidirBubbleSort(Object[] theArray,
Comparison compare)
Performs a bidirectional "bubble" sort on theArray passed in. |
static long |
bubbleSort(int[] theArray)
Performs a "bubble" sort on theArray passed in. |
static long |
bubbleSort(Object[] theArray,
Comparison compare)
Performs a "bubble" sort on theArray passed in. |
static long |
heapSort(int[] theArray)
Performs a "heap" sort on theArray passed in. |
static long |
heapSort(Object[] theArray,
Comparison compare)
Performs a "heap" sort on theArray passed in. |
static long |
insertionSort(int[] theArray)
Performs an "insertion" sort on theArray passed in. |
static long |
insertionSort(Object[] theArray,
Comparison compare)
Performs an "insertion" sort on theArray passed in. |
static void |
main(String[] argv)
Performs a "tree" sort on theArray passed in. |
static long |
mergeSort(int[] theArray)
Performs a "merge" sort on theArray passed in. |
static long |
mergeSort(Object[] theArray,
Comparison compare)
Performs a "merge" sort on theArray passed in. |
static long |
quickSort(int[] theArray)
Performs a "quick" sort on theArray passed in. |
static long |
quickSort(Object[] theArray,
Comparison compare)
Performs a "quick" sort on theArray passed in. |
static long |
selectionSort(int[] theArray)
Performs a "selection" sort on theArray passed in. |
static long |
selectionSort(Object[] theArray,
Comparison compare)
Performs a "selection" sort on theArray passed in. |
static long |
shellSort(int[] theArray)
Performs a "shell" sort on theArray passed in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Sort()
Method Detail |
public static final long bubbleSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long bubbleSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.Comparison
public static final long bidirBubbleSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long bidirBubbleSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long heapSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long heapSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long insertionSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long insertionSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long mergeSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long mergeSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long quickSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long quickSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long selectionSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static final long selectionSort(Object[] theArray, Comparison compare)
theArray
- is the array of ints to be sorted.compare
- is a Comparison that allows Objects to be compared.public static final long shellSort(int[] theArray)
theArray
- is the array of ints to be sorted.public static void main(String[] argv)
theArray
- is the array of ints to be sorted.
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |