|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object O2Plib.misc.Sort
public class Sort
Class Sort contains utility sort functions for the 2D Open2Dprot program.
This code is derived and refactored from MAExplorer Sort.java and Open2Dprot's Seg2Dgel Sg2sort.java module.
This work was derived from MAExplorer under the Mozilla 1.1 Open Source Public License by Peter Lemkin of the National Cancer Institute, an agency of the United States Government subject to the limitations noted in the accompanying LEGAL file. See licence info on http://maexplorer.sourceforge.org/
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 Open2Dprot Mozilla and Legal files are available on http://Open2Dprot.sourceforge.net/.
Constructor Summary | |
---|---|
Sort()
Sort() - Constructor |
Method Summary | |
---|---|
static java.lang.String[] |
bubbleSort(java.lang.String[] data,
int len)
bubbleSort() - Sort String array via bubble sort w/len |
static int[] |
bubbleSortIndex(float[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort copy of float[0:len-1] data with bubble sort, return index[]. |
static int[] |
bubbleSortIndex(int[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort copy of int[0:len-1] data with bubble sort, return index[]. |
static int[] |
bubbleSortIndex(java.lang.String[] data,
int len,
boolean ascending)
bubbleSortIndex() - sort copy of String[0:len-1] data with bubble sort, return index[]. |
static void |
quickSort(int[] a,
int lo0,
int hi0)
quickSort() - sort the int[] array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sort()
Method Detail |
---|
public static void quickSort(int[] a, int lo0, int hi0)
a
- array of data to sortlo0
- lower bound of arrayhi0
- uppper bound of arraypublic static 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 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 true
public static 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 true
public static 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 true
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |