sort_is_sorted Interface

interface
public module function sort_is_sorted(keys, n) result(answer)

Arguments

Type IntentOptional Attributes Name
type(sort_key_buf), intent(in) :: keys(:)

the keys, in precedence order.

integer(kind=int64), intent(in) :: n

rows.

Return Value logical

.true. when already ordered.

Description

Are rows 1..n already in order under every key?

Over sort_keys_compare, so adjacent EQUAL rows are in order — the tiebreaker would turn this into "is the row index ascending".