net.sf.jsort.linear
Class RadixSort

java.lang.Object
  extended by net.sf.jsort.linear.BaseLinearSort
      extended by net.sf.jsort.linear.RadixSort
All Implemented Interfaces:
LinearSort, SortAlgorithm

public class RadixSort
extends BaseLinearSort

This class implements a sorting algorithm based on each digit of each entry. It stripes digits from index value in rows for sorting. It starts from the least significant digit to most significant. See http://en.wikipedia.org/wiki/Radix_sort from details about it.

Author:
Domingos Creado

Nested Class Summary
static class RadixSort.RadixIndexResolver
          A proxy implementation of IndexResolver that stripe a digit from index.
 
Constructor Summary
RadixSort()
           
 
Method Summary
 void sort(java.lang.Object[] list, IndexResolver resolver, int start, int end, int maxIndex)
           
 
Methods inherited from class net.sf.jsort.linear.BaseLinearSort
sort, sort, sort, sort, sort, sort, sort, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadixSort

public RadixSort()
Method Detail

sort

public void sort(java.lang.Object[] list,
                 IndexResolver resolver,
                 int start,
                 int end,
                 int maxIndex)
Specified by:
sort in class BaseLinearSort


Copyright © 2005-2008 Domingos Creado. All Rights Reserved.