Package rma.util
Class RMASort
java.lang.Object
rma.util.RMASort
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidFor Testing.static voidmergeSort(Comparable[] keys, Object[] values) Performs a mergesort on the keys array, duplicates the sorting changes in the values array.static voidPerforms a mergesort on the keys List, duplicates the sorting changes in the values List.static voidmergeSort(Compare comparitor, Comparable[] keys, Object[] values) static voidstatic voidmultipleColumnSort(int[] columnsIndex, List rows, boolean ascending) Sorts a vector of vectors by a list of columns.protected static voidmultipleColumnSort0(int[] columnsIndex, int start, int stop, List rows, boolean ascending) static voidquickSort(double[] keyArray, double[] objArray, boolean ascending) static voidquickSort(double[] keyArray, int[] objArray, boolean ascending) static voidQuicksorts an array of Objects using the keys.static voidstatic voidstatic voidstatic voidquickSort(int[] keyArray, int[] objArray, boolean ascending) static voidQuicksorts an array of Objects using the keys.static voidstatic voidQuicksorts a List of Rows using an column index as a key.static voidQuickSort with with an index.static voidQuicksorts an array of Objects using toString().static voidThe base quickSort without keys.static voidstatic voidQuicksorts an array of Doubles.static voidstatic voidQuicksorts an array of Objects using toString().static voidstatic voidstatic voidQuicksorts an array of Objects using the keys toString().static voidstatic voidQuicksorts a List of Objects using toString().static voidstatic voidstatic voidstatic voidprotected static voidquickSort0(int first, int last, double[] keyArray, double[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, double[] keyArray, int[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, double[] keyArray, Object[] objArray, int[] objArray2, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, double[] keyArray, Object[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, float[] keyArray, Object[] objArray, RMASort.FloatCompare floatCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, int[] keyArray, int[] objArray, RMASort.IntegerCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, int[] keyArray, Object[] objArray, RMASort.IntegerCompare intCompare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, int index, List rows, Compare compare, boolean ascending) The recursive quicksort routine for a List of rows and a key index.protected static voidquickSort0(int first, int last, Object[] keyArray, Object[] objArray, Compare compare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static voidquickSort0(int first, int last, Object[] objArray, Compare compare, boolean ascending) The recursive quicksort routine.
-
Field Details
-
ASCENDING
public static final boolean ASCENDING- See Also:
-
DECENDING
public static final boolean DECENDING- See Also:
-
-
Constructor Details
-
RMASort
public RMASort()
-
-
Method Details
-
quickSort
Quicksorts a List of Rows using an column index as a key. -
quickSort
QuickSort with with an index. -
quickSort
Quicksorts a List of Objects using toString(). This quicksort is a little slower than using an array because it uses a temp array to work on. -
quickSort
-
quickSort
-
quickSort
Quicksorts an array of Objects using toString(). -
quickSort
-
quickSort
-
quickSort
Quicksorts an array of Objects using toString(). -
quickSort
The base quickSort without keys. -
quickSort
-
quickSort
Quicksorts an array of Doubles. -
quickSort
-
multipleColumnSort
Sorts a vector of vectors by a list of columns. This sequentially sorts columns based on the array, narrowing the sort. It tries to emulate the way that Excel sorts multiple columns. -
multipleColumnSort0
protected static void multipleColumnSort0(int[] columnsIndex, int start, int stop, List rows, boolean ascending) -
mergeSort
Performs a mergesort on the keys List, duplicates the sorting changes in the values List.- Parameters:
keys- Objects in the keys List must implement Comparable.values-
-
mergeSort
-
mergeSort
Performs a mergesort on the keys array, duplicates the sorting changes in the values array.- Parameters:
keys-values-
-
mergeSort
-
quickSort
-
quickSort
-
quickSort
Quicksorts an array of Objects using the keys toString(). -
quickSort
-
quickSort
Quicksorts an array of Objects using the keys. -
quickSort
-
quickSort
public static void quickSort(double[] keyArray, Object[] objArray, int[] objArray2, boolean ascending) -
quickSort
public static void quickSort(double[] keyArray, double[] objArray, boolean ascending) -
quickSort
public static void quickSort(double[] keyArray, int[] objArray, boolean ascending) -
quickSort
public static void quickSort(int[] keyArray, int[] objArray, boolean ascending) -
quickSort
Quicksorts an array of Objects using the keys. -
quickSort
-
quickSort
-
quickSort0
protected static void quickSort0(int first, int last, int index, List rows, Compare compare, boolean ascending) The recursive quicksort routine for a List of rows and a key index. -
quickSort0
protected static void quickSort0(int first, int last, Object[] objArray, Compare compare, boolean ascending) The recursive quicksort routine. -
quickSort0
protected static void quickSort0(int first, int last, double[] keyArray, Object[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for double Keys -
quickSort0
protected static void quickSort0(int first, int last, double[] keyArray, Object[] objArray, int[] objArray2, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for double Keys -
quickSort0
protected static void quickSort0(int first, int last, double[] keyArray, double[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for double Keys -
quickSort0
protected static void quickSort0(int first, int last, double[] keyArray, int[] objArray, RMASort.DoubleCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for double Keys -
quickSort0
protected static void quickSort0(int first, int last, int[] keyArray, int[] objArray, RMASort.IntegerCompare dblCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for double Keys -
quickSort0
protected static void quickSort0(int first, int last, int[] keyArray, Object[] objArray, RMASort.IntegerCompare intCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for int Keys -
quickSort0
protected static void quickSort0(int first, int last, float[] keyArray, Object[] objArray, RMASort.FloatCompare floatCompare, boolean ascending) The recursive quicksort routine using key-value pairs. -- for float Keys -
quickSort0
protected static void quickSort0(int first, int last, Object[] keyArray, Object[] objArray, Compare compare, boolean ascending) The recursive quicksort routine using key-value pairs. -
main
For Testing.
-