allensoft.gui.treetable
Class MergeSort
java.lang.Object
|
+--allensoft.gui.treetable.MergeSort
- public abstract class MergeSort
- extends java.lang.Object
An implementation of MergeSort, needs to be subclassed to
compare the terms.
Field Summary |
protected java.lang.Object[] |
swapSpace
|
protected java.lang.Object[] |
toSort
|
Method Summary |
abstract int |
compareElementsAt(int beginLoc,
int endLoc)
|
protected void |
merge(int begin,
int middle,
int end)
|
protected void |
mergeSort(int begin,
int end)
|
void |
sort(java.lang.Object[] array)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toSort
protected java.lang.Object[] toSort
swapSpace
protected java.lang.Object[] swapSpace
MergeSort
public MergeSort()
sort
public void sort(java.lang.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)