Implements quicksort for a sequence of integers and reals, in combination with insertion sort for very short sequences.
Sorts a sequence of integers
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout), | DIMENSION (:) | :: | list |
Sequence of integers to be sorted |
|
| integer, | intent(out), | optional, | DIMENSION (:) | :: | order |
Indices of the sorted sequence |
Sorts a sequence of reals
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=RP), | intent(inout), | DIMENSION (:) | :: | list |
Sequence of reals to be sorted |
|
| integer, | intent(out), | optional, | DIMENSION (:) | :: | order |
Indices of the sorted sequence |