C E G H I M Q R S T 

C

compareTo(SortObject) - Method in class SortObject
Compares this SortObject to the one given and increments the comparison counter.
ComparisonSort - Class in <Unnamed>
This class implements six different comparison sorts (and an optional seventh sort for extra credit): selection sort insertion sort merge sort quick sort heap sort selection2 sort (extra credit) insertion2 sort It also has a method that runs all the sorts on the same input array and prints out statistics.
ComparisonSort() - Constructor for class ComparisonSort
 

E

equals(Object) - Method in class SortObject
Returns true if the given SortObject has the same integer data value as this one.

G

getCompares() - Static method in class SortObject
Returns the value of the comparison counter.
getData() - Method in class SortObject
Returns the integer data value for this SortObject.

H

heapSort(E[]) - Static method in class ComparisonSort
Sorts the given array using the heap sort algorithm outlined below.

I

insertion2Sort(E[]) - Static method in class ComparisonSort
Extra Credit: Sorts the given array using the insertion2 sort algorithm outlined below.
insertionSort(E[]) - Static method in class ComparisonSort
Sorts the given array using the insertion sort algorithm.

M

main(String[]) - Static method in class TestSort
Main method to run the ComparisonSort class.
mergeSort(E[]) - Static method in class ComparisonSort
Sorts the given array using the merge sort algorithm.

Q

quickSort(E[]) - Static method in class ComparisonSort
Sorts the given array using the quick sort algorithm, using the median of the first, last, and middle values in each segment of the array as the pivot value.

R

resetCompares() - Static method in class SortObject
Resets the comparison counter to 0.
runAllSorts(SortObject[]) - Static method in class ComparisonSort
Sorts the given array using the six (seven with the extra credit) different sorting algorithms and prints out statistics.

S

selection2Sort(E[]) - Static method in class ComparisonSort
Sorts the given array using the selection2 sort algorithm outlined below.
selectionSort(E[]) - Static method in class ComparisonSort
Sorts the given array using the selection sort algorithm.
SortObject - Class in <Unnamed>
A SortObject is essentially an integer wrapper class that keeps track of the number of comparisons that are done on SortObjects.
SortObject(int) - Constructor for class SortObject
Creates a new SortObject with the given value.

T

TestSort - Class in <Unnamed>
This program tests some of the functionality of the ComparisonSort class.
TestSort() - Constructor for class TestSort
 
toString() - Method in class SortObject
Returns a String representation, in this case a String containing the integer data value.
C E G H I M Q R S T