com.mhhe.clrs2e
Class BucketSort

java.lang.Object
  |
  +--com.mhhe.clrs2e.BucketSort

public class BucketSort
extends java.lang.Object

Sorts an array of DoubleValued in the range [0, 1) via the bucket sort algorithm from page 174 of Introduction to Algorithms, Second edition.


Constructor Summary
BucketSort()
           
 
Method Summary
 void sort(com.mhhe.clrs2e.DoubleValued[] array)
          Sorts an array of DoubleValued.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BucketSort

public BucketSort()
Method Detail

sort

public void sort(com.mhhe.clrs2e.DoubleValued[] array)
Sorts an array of DoubleValued.

Parameters:
array - The array of DoubleValued objects to be sorted.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if any element of array has a value outside the half-open interval [0,1).