sortp(3f) - [M_datapac:SORT] sorts and ranks a numeric vector X
Synopsis
Description
Options
Examples
Author
Maintainer
License
References
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)
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.
X description of parameter Y description of parameter
Sample program:
program demo_sortp use M_datapac, only : sortp implicit none ! call sortp(x,y) end program demo_sortpResults:
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
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) | February 23, 2025 |