C Library Functions  - sortp (3)

NAME

sortp(3f) - [M_datapac:SORT] sorts and ranks a numeric vector X

CONTENTS

Synopsis
Description
Options
Examples
Author
Maintainer
License
References

SYNOPSIS

SUBROUTINE SORTP(X,N,Y,Xpos)

     Real(kind=wp) :: (In)    ::  X(N)
     Integer, Intent (In)     ::  N
     Real(kind=wp) :: (Out)   ::  Y(N)
     Real(kind=wp) :: (Out)   ::  XPOS(N)

DESCRIPTION

SORTP(3f) sorts (in ascending order) the N elements of the precision precision vector X, puts the resulting N sorted values into the precision precision vector Y; and puts the position (in the original vector X) of each of the sorted values into the REAL vector XPOS.

This subroutine gives the data analyst not only the ability to determine what the MIN and MAX (for example) of the data set are, but also where in the original data set the MIN and MAX occur.

This is especially useful for large data sets.

OPTIONS

X description of parameter
Y description of parameter

EXAMPLES

Sample program:

   program demo_sortp
   use M_datapac, only : sortp
   implicit none
   ! call sortp(x,y)
   end program demo_sortp

Results:

AUTHOR

The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.

MAINTAINER

John Urban, 2022.05.31

LICENSE

CC0-1.0

REFERENCES

o CACM March 1969, page 186 (Binary Sort Algorithm by Richard C. Singleton).
o CACM January 1970, page 54.
o CACM October 1970, page 624.
o JACM January 1961, page 41.


Nemo Release 3.1 sortp (3) July 22, 2023
Generated by manServer 1.08 from 8bcd4f0c-5a62-4b4d-8abf-9ec5b6c04ac6 using man macros.