jdsl.core.algo.sorts
Class ArrayInsertionSort

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

public class ArrayInsertionSort
extends java.lang.Object
implements SortObject


Constructor Summary
ArrayInsertionSort()
           
 
Method Summary
 void sort(Sequence S, Comparator c)
          Perform insertion-sort, assuming the Sequence is based on a vector (O(1) atRank). The sort proceeds by looking at each element in turn, and moving them down to where they belong in the sorted part of the sequence (the beginning).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayInsertionSort

public ArrayInsertionSort()
Method Detail

sort

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

The sort proceeds by looking at each element in turn, and moving them down to where they belong in the sorted part of the sequence (the beginning).

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