Relay onto p_nth; see oracle_argsort for why these exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(sort_key_buf), | intent(in), | target | :: | keys(:) |
the keys, primary first. |
|
| integer(kind=int64), | intent(in) | :: | nrows |
rows each key describes. |
||
| integer(kind=int64), | intent(in) | :: | nth |
the rank wanted, 1-based. |
||
| character(len=*), | intent(in) | :: | proc |
calling procedure, for messages. |
||
| integer(kind=int64), | intent(out) | :: | idx |
the row holding that rank. |
subroutine oracle_nth(keys, nrows, nth, proc, idx) type(sort_key_buf), intent(in), target :: keys(:) !! the keys, primary first. integer(int64), intent(in) :: nrows !! rows each key describes. integer(int64), intent(in) :: nth !! the rank wanted, 1-based. character(len=*), intent(in) :: proc !! calling procedure, for messages. integer(int64), intent(out) :: idx !! the row holding that rank. ! call check_oracle(associated(p_nth), proc) call p_nth(keys, nrows, nth, proc, idx) end subroutine oracle_nth