KPG1_QSRTX

Sorts a vector via the Quicksort algorithm

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: