Search Site | Contact Details | FAQ

ADAS Subroutine xxindx

      SUBROUTINE XXINDX( N , ARR , INDX )
C-----------------------------------------------------------------------
C
C  ****************** FORTRAN77 SUBROUTINE: XXINDX *********************
C
C  PURPOSE: INDEXES AN ARRAY 'ARR' OF LENGTH 'N'. IT OUTPUTS THE ARRAY
C           'INDX()' SUCH THAT 'ARR(INDX(J))' IS  IN  ASCENDING  ORDER
C           FOR J=1,2,...,N.   THE INPUT QUANTITIES 'N' AND 'ARR'  ARE
C           NOT CHANGED.
C
C  REFERENCE:  NUMERICAL RECIPES: The Art of Scientific Computing
C              (FORTRAN Version).
C              W.H.Press, B.P.Flannery, S.A.Teukolsky & W.T.Vetterling.
C              (Cambridge University Press, Cambridge). 1989. p.233
C              ISBN 0 521 38330 7
C
C  CALLING PROGRAM: GENERAL USE
C
C  SUBROUTINE:
C
C  INPUT :    (I*4)  N       = INPUT ARRAY 'ARR()' LENGTH
C  INPUT :    (R*8)  ARR()   = ARRAY TO BE INDEXED
C  OUTPUT:    (I*4)  INDX()  = ASCENDING ORDER INDEX
C
C             (R*8)  INDXT   = TEMPORARY STORAGE FOR 'INDX' ELEMENT
C             (I*4)  L       = "HIRING" PHASE INDEX
C             (I*4)  IR      = "RETIREMENT-AND-PROMOTION"  PHASE INDEX
C             (I*4)  I       = GENERAL USE
C             (I*4)  J       = GENERAL USE
C
C             (R*8)  Q       = TEMPORARY STORAGE FOR 'ARR' ELEMENT
C
C ROUTINES:  NONE
C
C NOTE:      USES THE HEAPSORT METHOD.
C
C AUTHOR:  PAUL E. BRIDEN (TESSELLA SUPPORT SERVICES PLC)
C          K1/0/81
C          JET EXT. 4569
C
C DATE:    09/10/90
C
C-----------------------------------------------------------------------
C
C-----------------------------------------------------------------------
      INTEGER             INDX(N),     N
      REAL*8              ARR(N)
© Copyright 1995-2024 The ADAS Project
Comments and questions to: adas-at-adas.ac.uk