| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sort_key_buf), | intent(in) | :: | keys(:) |
the keys, in precedence order. |
||
| integer(kind=int64), | intent(in) | :: | n |
rows available. |
||
| integer(kind=int64), | intent(in) | :: | count |
leading entries to order. |
||
| integer(kind=int64), | intent(inout) | :: | perm(:) |
receives |
The first count entries of the sorted permutation, by heap selection.
std::partial_sort's algorithm, not a full sort truncated -- a test counts
comparisons to hold that apart. Everything past count in perm is untouched.