Package rma.util
Class RMASort
java.lang.Object
rma.util.RMASort
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
For Testing.static void
mergeSort
(Comparable[] keys, Object[] values) Performs a mergesort on the keys array, duplicates the sorting changes in the values array.static void
Performs a mergesort on the keys List, duplicates the sorting changes in the values List.static void
mergeSort
(Compare comparitor, Comparable[] keys, Object[] values) static void
static void
multipleColumnSort
(int[] columnsIndex, List rows, boolean ascending) Sorts a vector of vectors by a list of columns.protected static void
multipleColumnSort0
(int[] columnsIndex, int start, int stop, List rows, boolean ascending) static void
quickSort
(double[] keyArray, double[] objArray, boolean ascending) static void
quickSort
(double[] keyArray, int[] objArray, boolean ascending) static void
Quicksorts an array of Objects using the keys.static void
static void
static void
static void
quickSort
(int[] keyArray, int[] objArray, boolean ascending) static void
Quicksorts an array of Objects using the keys.static void
static void
Quicksorts a List of Rows using an column index as a key.static void
QuickSort with with an index.static void
Quicksorts an array of Objects using toString().static void
The base quickSort without keys.static void
static void
Quicksorts an array of Doubles.static void
static void
Quicksorts an array of Objects using toString().static void
static void
static void
Quicksorts an array of Objects using the keys toString().static void
static void
Quicksorts a List of Objects using toString().static void
static void
static void
static void
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.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.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.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.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.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.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.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.protected static void
quickSort0
(int first, int last, Object[] keyArray, Object[] objArray, Compare compare, boolean ascending) The recursive quicksort routine using key-value pairs.protected static void
quickSort0
(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.
-