Function: RANKRA
Purpose: Indexes a real array in ascending order.
Category: MATH
File: rank.c
Author: K.G. Begeman
Use: CALL RANKRA( ARRIN , Input REAL ARRAY
INDX , Output INTEGER ARRAY
N ) Input INTEGER
ARRIN Array to be indexed.
INDX Sorted index.
N Number of elements in ARRIN and INDX.
Description: RANKRA indexes an array ARRIN of length N, i.e. outputs
the array INDX such that ARRIN(INDX(J)+1) is in
ascending order for J = 1, 2, ..., N. The input
quantities N and ARRIN are not changed. The heapsort
algorithm is used.
Updates: May 15, 1990: KGB, Document created.