Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap2_198111 - decus/20-0026/rank.doc
There are 2 other files named rank.doc in the archive. Click here to see a list.
SUBROUTINE RANK

PURPOSE
   RANK A VECTOR OF VALUES

USAGE
   CALL RANK(A,R,N)

DESCRIPTION OF PARAMETERS
   A - INPUT VECTOR OF N VALUES
   R - OUTPUT VECTOR OF LENGTH N. SMALLEST VALUE IS RANKED 1,
       LARGEST IS RANKED N. TIES ARE ASSIGNED AVERAGE OF TIED
       RANKS
   N - NUMBER OF VALUES

REMARKS
   NONE

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
   NONE

METHOD
   VECTOR IS SEARCHED FOR SUCCESSIVELY LARGER ELEMENTS. IF TIES
   OCCUR, THEY ARE LOCATED AND THEIR RANK VALUE COMPUTED.
   FOR EXAMPLE, IF 2 VALUES ARE TIED FOR SIXTH RANK, THEY ARE
   ASSIGNED A RANK OF 6.5 (=(6+7)/2)