ESMF_DLASRT Subroutine

subroutine ESMF_DLASRT(ID, N, D, INFO)

\brief \b ESMF_DLASRT \htmlonly Download ESMF_DLASRT + dependencies [TGZ] [ZIP] [TXT] \endhtmlonly \par Purpose:

\verbatim

Sort the numbers in D in increasing order (if ID = ‘I’) or in decreasing order (if ID = ‘D’ ).

Use Quick Sort, reverting to Insertion sort on arrays of size <= 20. Dimension of STACK limits N to about 2*32. \endverbatim \param[in] ID \verbatim ID is CHARACTER1 = ‘I’: sort D in increasing order; = ‘D’: sort D in decreasing order. \endverbatim

\param[in] N \verbatim N is INTEGER The length of the array D. \endverbatim

\param[in,out] D \verbatim D is DOUBLE PRECISION array, dimension (N) On entry, the array to be sorted. On exit, D has been sorted into increasing order (D(1) <= … <= D(N) ) or into decreasing order (D(1) >= … >= D(N) ), depending on ID. \endverbatim

\param[out] INFO \verbatim INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value \endverbatim \author Univ. of Tennessee \author Univ. of California Berkeley \author Univ. of Colorado Denver \author NAG Ltd. \date November 2011 \ingroup auxOTHERcomputational

Arguments

Type IntentOptional Attributes Name
character(len=1) :: ID
integer :: N
double precision :: D(*)
integer :: INFO