sorts
Class Real_Sorts_f77

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

public class Real_Sorts_f77
extends java.lang.Object

This class permits one to perform sorts of real numbers.


Constructor Summary
Real_Sorts_f77()
           
 
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_f77

public Real_Sorts_f77()
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 1 -- n rather than 0 -- n-1. See Real_Sorts for a method that sorts locations 0 -- n-1.

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.