All Packages Class Hierarchy This Package Previous Next Index
Class RouterLayer.util.QSort
RouterLayer.util.QSort
- public class QSort
Quick Sort algorithm, extracted from the JDK demo example
-
QSort()
- Default constructor
-
sort(int[])
- Sort integer array the from first element to the last element
-
sort(int[], int, int)
- This is a generic version of C.A.R Hoare's Quick Sort
algorithm.
QSort
public QSort()
- Default constructor
sort
public void sort(int a[],
int lo0,
int hi0)
- This is a generic version of C.A.R Hoare's Quick Sort
algorithm. This will handle arrays that are already
sorted, and arrays with duplicate keys.
If you think of a one dimensional array as going from
the lowest index on the left to the highest index on the right
then the parameters to this function are lowest index or
left and highest index or right. The first time you call
this function it will be with the parameters 0, a.length - 1.
- Parameters:
- a - an integer array
- lo0 - left boundary of array partition
- hi0 - right boundary of array partition
sort
public void sort(int a[]) throws Exception
- Sort integer array the from first element to the last element
- Parameters:
- a[] - Integer array to be sorted
- Throws: Array
- related exception will be thrown
All Packages Class Hierarchy This Package Previous Next Index