|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--MJAbase | +--MJAsort
MAExplorer Open Java API class to access MJAsort methods and data structures. Access builtin sort methods.
List of methods available to Plugin-writers sortStrArray() - create a sorted String[] array. sortStrArray() - create a sorted String[] array with len specified. bubbleSort() - Sort String array via bubble sort. bubbleSort() - Sort String array via bubble sort w/len specified bubbleSortIndex() - sort String data[0:len-1] copy w/bubble sort, bubbleSortIndex() - sort short data[0:len-1] copy w/bubble sort, bubbleSortIndex() - sort int data[0:len-1] copy w/bubble sort, bubbleSortIndex() - sort float data[0:len-1] copy w/bubble sort, uniqueInsertionSort() - insertion sort newStr into sList[] if unique. uniqueInsertionSort() - insertion bubble sort s1,s2 into sList1[], sList2[] sortArray() - bubble sort string array either ASCENDING or DESCENDING. uniqueInsert() - insert s1 at end of sList1[] and UC of s1 in sList1UC[] uniqueInsert() - insert s1,s2 at end of sList1[], sList2[] lists quickSort() - sort the int list a[]. quickSort() - sort the String list a[]. quickSortMultLists() - sort parallel lists (a[], a[UC[]) by aUC[]. quickSortMultLists() - sort parallel lists (a[], b[], aUC[]) by aUC[].
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The MAExplorer Mozilla and Legal files are available on http://maexplorer.sourceforge.net/.
Method Summary | |
java.lang.String[] |
bubbleSort(java.lang.String[] data)
bubbleSort() - Sort String array via bubble sort. |
java.lang.String[] |
bubbleSort(java.lang.String[] data,
int len)
bubbleSort() - Sort String array via bubble sort w/len specified |
int[] |
bubbleSortIndex(float[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort float data[0:len-1] copy w/bubble sort, return index[] |
int[] |
bubbleSortIndex(int[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort int data[0:len-1] copy w/bubble sort, return index[] |
int[] |
bubbleSortIndex(short[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort int data[0:len-1] copy w/bubble sort, return index[] Do NOT actually sort the original data[]. |
static int[] |
bubbleSortIndex(java.lang.String[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort String data[0:len-1] copy w/bubble sort, return index[]. |
void |
quickSort(int[] data,
int lo0,
int hi0)
quickSort() - sort the int list data[]. |
void |
quickSort(java.lang.String[] data,
int lo0,
int hi0)
quickSort() - sort the String list data[]. |
void |
quickSortMultLists(java.lang.String[] data,
java.lang.String[] dataUC,
int lo0,
int hi0)
quickSortMultLists() - sort parallel lists (data[], data[UC[]) by dataUC[]. |
void |
quickSortMultLists(java.lang.String[] a,
java.lang.String[] b,
java.lang.String[] aUC,
int lo0,
int hi0)
quickSortMultLists() - sort parallel lists (a[], b[], aUC[]) by aUC[]. |
java.lang.String[] |
sortArray(java.lang.String[] data,
boolean sortAscending)
sortArray() - bubble sort string array either ASCENDING or DESCENDING. |
java.lang.String[] |
sortStrArray(java.lang.String[] unsortedData)
sortStrArray() - create a sorted String[] array. |
java.lang.String[] |
sortStrArray(java.lang.String[] unsortedData,
int len)
sortStrArray() - create a sorted String[] array with len specified. |
int |
uniqueInsert(java.lang.String[] sList1,
java.lang.String[] sList1UC,
int sListLen,
java.lang.String s1,
java.util.Hashtable ht)
uniqueInsert() - insert s1 at end of sList1[] and UC of s1 in sList1UC[] if s1 is not already in sList1[]. |
int |
uniqueInsert(java.lang.String[] sList1,
java.lang.String[] sList2,
java.lang.String[] sList1UC,
int sListLen,
java.lang.String s1,
java.lang.String s2,
java.util.Hashtable ht)
uniqueInsert() - insert s1,s2 at end of sList1[], sList2[] lists if s1 is not already in sList1[]. |
int |
uniqueInsertionSort(java.lang.String[] sList,
java.lang.String[] sListUC,
int sListLen,
java.lang.String newStr,
java.util.Hashtable ht)
uniqueInsertionSort() - insertion sort newStr into sList[] if unique. |
int |
uniqueInsertionSort(java.lang.String[] sList1,
java.lang.String[] sList2,
java.lang.String[] sListUC,
int sListLen,
java.lang.String s1,
java.lang.String s2,
java.util.Hashtable ht)
uniqueInsertionSort() - insertion bubble sort s1,s2 into sList1[], sList2[] if s1 is unique. |
Methods inherited from class MJAbase |
cvtHashtable2SimpleTable, cvtTable2Hashtable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public final java.lang.String[] sortStrArray(java.lang.String[] unsortedData)
unsortedData
- array of data to be sortedpublic final java.lang.String[] sortStrArray(java.lang.String[] unsortedData, int len)
unsortedData
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]public final java.lang.String[] bubbleSort(java.lang.String[] data)
data
- array of data to be sortedpublic final java.lang.String[] bubbleSort(java.lang.String[] data, int len)
data
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]public static final int[] bubbleSortIndex(java.lang.String[] data, int len, boolean ascending)
data
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]ascending
- sort if truepublic final int[] bubbleSortIndex(short[] data, int len, boolean ascending)
data
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]ascending
- sort if truepublic final int[] bubbleSortIndex(int[] data, int len, boolean ascending)
data
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]ascending
- sort if truepublic final int[] bubbleSortIndex(float[] data, int len, boolean ascending)
data
- array of data to be sortedlen
- size of subarray array of data to be sorted [0:len-1]ascending
- sort if truepublic final int uniqueInsertionSort(java.lang.String[] sList, java.lang.String[] sListUC, int sListLen, java.lang.String newStr, java.util.Hashtable ht)
sList
- array of data to be sortedsListUC
- array of parallel uppercase data to be sortedsListLen
- size of subarray of data to be sorted [0:sListLen-1]newStr
- new data to insertht
- hashtable to usepublic final int uniqueInsertionSort(java.lang.String[] sList1, java.lang.String[] sList2, java.lang.String[] sListUC, int sListLen, java.lang.String s1, java.lang.String s2, java.util.Hashtable ht)
sList1
- array of data to be sortedsList2
- array of data to be sortedsListUC
- array of parallel uppercase data to be sortedsListLen
- size of subarray array of data to sorted [0:sListLen-1]s1
- new data to inserts2
- new data to insertht
- hashtable to usepublic final java.lang.String[] sortArray(java.lang.String[] data, boolean sortAscending)
data
- array of data to be sortedsortAscending
- direction of sortpublic final int uniqueInsert(java.lang.String[] sList1, java.lang.String[] sList1UC, int sListLen, java.lang.String s1, java.util.Hashtable ht)
sList1
- array of data to be sortedsListUC
- array of parallel uppercase data to be sortedsListLen
- size of subarray array of data to sorted [0:sListLen-1]newStr
- sort if truepublic final int uniqueInsert(java.lang.String[] sList1, java.lang.String[] sList2, java.lang.String[] sList1UC, int sListLen, java.lang.String s1, java.lang.String s2, java.util.Hashtable ht)
sList1
- array of data to be sortedsList2
- array of data to be sortedsListUC
- array of parallel uppercase data to be sortedsListLen
- size of subarray array of data to sorted [0:sListLen-1]s1
- data to inserts2
- data to insertht
- hashtablepublic final void quickSort(int[] data, int lo0, int hi0)
data
- array of data to sortlo0
- lower bound of arrayhi0
- uppper bound of arraypublic final void quickSort(java.lang.String[] data, int lo0, int hi0)
data
- array of data to sortlo0
- lower bound of arrayhi0
- uppper bound of arraypublic final void quickSortMultLists(java.lang.String[] data, java.lang.String[] dataUC, int lo0, int hi0)
data
- array of data to sortdataUC
- upper case version of array data[]lo0
- lower bound of arrayhi0
- uppper bound of arraypublic final void quickSortMultLists(java.lang.String[] a, java.lang.String[] b, java.lang.String[] aUC, int lo0, int hi0)
a
- array of data to sortb
- array of data to sortaUC
- upper case version of array a[]lo0
- lower bound of arrayhi0
- uppper bound of array
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |