|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--Opus5.AbstractSorter
|
+--Opus5.BucketSorter
Sorter for sorting an array of Ints.
Implements bucket sort.
Int| Field Summary | |
protected int[] |
count
The counters (buckets). |
protected int |
m
The number of counters (buckets). |
| Fields inherited from class Opus5.AbstractSorter |
array, n |
| Fields inherited from interface Opus5.Sorter |
copyright |
| Constructor Summary | |
BucketSorter(int m)
Constructs a BucketSorter with the specified number
of buckets. |
|
| Method Summary | |
protected void |
sort()
Sorts the array of comparable objects. |
protected void |
sort(Int[] array)
Sorts the specified array. |
| Methods inherited from class Opus5.AbstractSorter |
sort, swap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int m
protected int[] count
| Constructor Detail |
public BucketSorter(int m)
BucketSorter with the specified number
of buckets.m - The desired number of buckets.| Method Detail |
protected void sort()
Ints.sort in class AbstractSorterprotected void sort(Int[] array)
array - The array to sort.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||