util
Class MergeSort
java.lang.Object
util.MergeSort
public abstract class MergeSort
- extends Object
An implementation of MergeSort, needs to be subclassed to compare the terms.
- Author:
- Scott Violet
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toSort
protected Object[] toSort
swapSpace
protected Object[] swapSpace
MergeSort
public MergeSort()
sort
public void sort(Object[] array)
compareElementsAt
public abstract int compareElementsAt(int beginLoc,
int endLoc)
mergeSort
protected void mergeSort(int begin,
int end)
merge
protected void merge(int begin,
int middle,
int end)