Function: RANKRD
Purpose: Indexes a real array in descending order.
Category: MATH
File: rank.c
Author: K.G. Begeman
Use: CALL RANKRD( 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: RANKRD indexes an array ARRIN of length N, i.e. outputs
the array INDX such that ARRIN(INDX(J)+1) is in
descending 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.