|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDataStructures.Sort
public class Sort
A class providing static array sorting routines
| Method Summary | ||
|---|---|---|
static
|
heapSort(E[] a,
int n)
Sorts an array a[0..n-1]
in ascending order using heapsort. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final <E extends java.lang.Comparable<? super E>> void heapSort(E[] a,
int n)
a[0..n-1]
in ascending order using heapsort. The array is
replaced on output by its sorted rearrangement.
Array elements must implement the Comparable interface
in their defining class or in some superclass.
E - the type of elements held in the arraya - the array to sortn - the number of elements sorted, elements
a[n] onwards are ignored
java.lang.ArrayIndexOutOfBoundsException - if n is
greater than the array length.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||