edu.northwestern.at.utils
Class Sorting

java.lang.Object
  extended by edu.northwestern.at.utils.Sorting

public class Sorting
extends java.lang.Object

Sorting.

Sorting provides methods for sorting values.


Constructor Summary
Sorting()
           
 
Method Summary
static void quickSort(double[] data, int[] index, int lo0, int hi0)
          Recursive quicksort that carries along an index array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sorting

public Sorting()
Method Detail

quickSort

public static void quickSort(double[] data,
                             int[] index,
                             int lo0,
                             int hi0)
Recursive quicksort that carries along an index array.

Parameters:
data - The data to sort (input and output).
index - The index (permutation) vector (output).
lo0 - The first element to sort.
hi0 - The last element to sort.

On output, data is sorted in ascending order. The index array contains the permuted indices of the sorted elements.