jdsl.core.algo.sorts
Class ArraySelectionSort

java.lang.Object
  |
  +--jdsl.core.algo.sorts.ArraySelectionSort

public class ArraySelectionSort
extends java.lang.Object
implements SortObject


Constructor Summary
ArraySelectionSort()
           
 
Method Summary
 void sort(Sequence S, Comparator c)
          Perform selection-sort, assuming the Sequence is based on a vector. The sort proceeds by finding the minimum of what's left, and inserting it at the end of the sorted part of the sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArraySelectionSort

public ArraySelectionSort()
Method Detail

sort

public void sort(Sequence S,
                 Comparator c)
Perform selection-sort, assuming the Sequence is based on a vector.

The sort proceeds by finding the minimum of what's left, and inserting it at the end of the sorted part of the sequence.

The sort is in-place: the first i elements are sorted, the remainder are not.

Specified by:
sort in interface SortObject
Parameters:
S -  
c -