Opus5
Class RadixSorter

java.lang.Object
  |
  +--Opus5.AbstractSorter
        |
        +--Opus5.RadixSorter
All Implemented Interfaces:
Sorter

public class RadixSorter
extends AbstractSorter

Sorter for sorting an array of Ints. Implements radix sort.

Version:
$Id: RadixSorter.java,v 3.4 1998/07/28 12:27:59 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.
See Also:
Int

Field Summary
protected  int[] count
          The array of counters (buckets).
protected static int p
          The number of passes.
protected static int r
          The logarithm to the base two of the radix.
protected static int R
          The radix.
 
Fields inherited from class Opus5.AbstractSorter
array, n
 
Fields inherited from interface Opus5.Sorter
copyright
 
Constructor Summary
RadixSorter()
           
 
Method Summary
protected  void sort()
          Sorts the array of comparable objects.
protected  void sort(Int[] array)
          Sorts the array of comparable objects.
 
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

r

protected static final int r
The logarithm to the base two of the radix.

R

protected static final int R
The radix.

p

protected static final int p
The number of passes.

count

protected int[] count
The array of counters (buckets).
Constructor Detail

RadixSorter

public RadixSorter()
Method Detail

sort

protected void sort()
Sorts the array of comparable objects. It is assumed that the array is an array of Ints.
Overrides:
sort in class AbstractSorter

sort

protected void sort(Int[] array)
Sorts the array of comparable objects.