Skip to content

Commit 54fc607

Browse files
jvdp1perazz
andauthored
Apply suggestions from code review
Co-authored-by: Federico Perini <[email protected]>
1 parent 55c29c3 commit 54fc607

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

doc/specs/stdlib_sorting.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ data:
4747
that have significant sections that were partially ordered before
4848
the sort;
4949
* `SORT_ADJOINT` is based on `ORD_SORT`, but in addition to sorting the
50-
input array, it returns a related array re-ordered in the
51-
same way;
50+
input array, it re-orders a second array of the same size
51+
according to the same permutations;
5252
* `SORT_INDEX` is based on `ORD_SORT`, but in addition to sorting the
5353
input array, it returns indices that map the original array to its
5454
sorted version. This enables related arrays to be re-ordered in the
@@ -149,7 +149,7 @@ The `SORT` and `ORD_SORT` subroutines can sort rank 1 isolated
149149
arrays of intrinsic types, but do nothing for the coordinated sorting
150150
of related data, e.g., a related rank 1 array. Therefore the module
151151
provides a subroutine, `SORT_ADJOINT`, that re-order such a rank 1 array
152-
in the same way as the input array based on the `ORD_SORT` algorithm,
152+
according to the same permutations as for the input array based on the `ORD_SORT` algorithm,
153153
in addition to sorting the input array.
154154

155155
The logic of `SORT_ADJOINT` parallels that of `ORD_SORT`, with
@@ -405,7 +405,8 @@ element of `array` is a `NaN`.
405405
{!example/sorting/example_radix_sort.f90!}
406406
```
407407

408-
#### `sort_adjoint` - sorts an associated array in the same way as the input array, while also sorting the array.
408+
#### `sort_adjoint` - sorts an associated array
409+
according to the same permutations as for the input array.
409410

410411
##### Status
411412

@@ -415,7 +416,7 @@ Experimental
415416

416417
Returns the input `array` sorted in the direction requested while
417418
retaining order stability, and an associated array whose elements are
418-
sorted in the same way as the input `array`.
419+
sorted according to the same permutations as for the input `array`.
419420

420421
##### Syntax
421422

0 commit comments

Comments
 (0)