sorts
Class Real_Sorts

java.lang.Object
  |
  +--sorts.Real_Sorts

public class Real_Sorts
extends java.lang.Object

This class permits one to perform sorts of real numbers.


Constructor Summary
Real_Sorts()
           
 
Method Summary
static void rsort(double[] x, double[] xsort, int[] origord, int n)
           This method attempts to perform an n*log(n) sort rather than an n*n sort.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Real_Sorts

public Real_Sorts()
Method Detail

rsort

public static void rsort(double[] x,
                         double[] xsort,
                         int[] origord,
                         int n)

This method attempts to perform an n*log(n) sort rather than an n*n sort. It sorts doubles. It also keeps track of the original order of the x's.

It sorts locations 0 -- n-1 rather than 1 -- n. See Real_Sorts_f77 for a method that sorts locations 1 -- n.

Steve Verrill, 5/2/89. Translated to Java from FORTRAN on 6/7/96.

There are other, faster sorts that are available in Java. See, for example, http://www.cs.ubc.ca/spider/harrison/Java/sorting-demo.html

Parameters:
n - n is the number of values to be sorted.