Skip to content

Commit 3195ae7

Browse files
committed
move this part of the documentation as suggested by jvdp1
1 parent 3fca4ee commit 3195ae7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/specs/stdlib_selection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ Generic subroutine.
102102

103103
`array` : shall be a rank one array of any of the types:
104104
`integer(int8)`, `integer(int16)`, `integer(int32)`, `integer(int64)`,
105-
`real(sp)`, `real(dp)`, `real(qp)`. It is an `intent(inout)` argument. On input it is
106-
the array in which we search for the kth smallest entry. On return its elements
107-
will be partially sorted such that:
108-
`all( array(1:k-1) <= array(k) )` and `all(array(k) <= array(k+1:size(array)))`.
105+
`real(sp)`, `real(dp)`, `real(qp)`. It is an `intent(inout)` argument.
109106

110107
`k`: shall be a scalar with any of the types:
111108
`integer(int8)`, `integer(int16)`, `integer(int32)`, `integer(int64)`. It
@@ -132,6 +129,9 @@ Selection of a single value should have runtime of O(`size(array)`), so it is
132129
asymptotically faster than sorting `array` entirely. The test program at the the
133130
end of this document shows that is the case.
134131

132+
On return the elements of `array` will be partially sorted such that:
133+
`all( array(1:k-1) <= array(k) )` and `all(array(k) <= array(k+1:size(array)))`.
134+
135135
##### Example
136136

137137
```fortran

0 commit comments

Comments
 (0)