net.sf.jsort.linear
Class CountingSort

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

public class CountingSort
extends BaseLinearSort

This class implements the counting sort algorithm. The strategy of this sorting algorithm is the assumption that each element to be sorted has a related integer value that absolutelly insert the element at the final set (like a priority).

Author:
Domingos Creado

Constructor Summary
CountingSort()
           
 
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

CountingSort

public CountingSort()
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.