jdsl.core.algo.sorts
Class ListSelectionSortWithTemp

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

public class ListSelectionSortWithTemp
extends java.lang.Object
implements SortObject


Constructor Summary
ListSelectionSortWithTemp()
           
 
Method Summary
 void sort(Sequence S, Comparator c)
          Perform selection-sort, assuming the Sequence is a double-linked list. This implementation repeatedly removes the minimum element from S and inserts it at the end of a temporary sequence, which is somewhat more elegant than the array-based version.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListSelectionSortWithTemp

public ListSelectionSortWithTemp()
Method Detail

sort

public void sort(Sequence S,
                 Comparator c)
Perform selection-sort, assuming the Sequence is a double-linked list.

This implementation repeatedly removes the minimum element from S and inserts it at the end of a temporary sequence, which is somewhat more elegant than the array-based version.

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