- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine sorts a
vector in situ between an upper and lower bounds using the Quicksort algorithm.
Invocation
CALL
KPG1_QSRTx( EL, LOW, HIGH, ARRAY, STATUS )
Arguments
EL = INTEGER (Given)
The number
of elements in the array that is to be sorted.
LOW = INTEGER (Given)
The lower bound within
the array, below which the array elements will not be sorted. It should be less than the
upper bound and must be within the array. In the latter case an error will result and the
routine will not sort the array.
HIGH = INTEGER (Given)
The upper bound within the
array, above which the array elements will not be sorted. It should be greater than the
lower bound and must be within the array. In the latter case an error will result and the
routine will not sort the array.
ARRAY( EL ) = ? (Given and Returned)
The array to be
sorted.
STATUS = INTEGER (Given and Returned)
The global status.
References
Timing
For N elements to be sorted the
timing goes as NlnN.
Implementation Status:
-
There is a routine for each of the data types integer, real, double precision, and character: replace "
x"
in the routine nam by I, R, D, or C respectively as appropriate.
-
If the maximum bound is less than the minimum, the bounds are swapped.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑