Skip to content

Commit 3fca4ee

Browse files
committed
clearer statement of partial sorting in code doc
1 parent 2ffc60b commit 3fca4ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stdlib_selection.fypp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ contains
8181
${arraytype}$, intent(inout) :: a(:)
8282
!! Array in which we seek the kth-smallest entry.
8383
!! On output it will be partially sorted such that
84-
!! `maxval(a(1:(k-1))) <= a(k) <= minval(a((k+1):size(a))).`
84+
!! `all(a(1:(k-1)) <= a(k)) .and. all(a(k) <= a((k+1):size(a)))`.
8585
${inttype}$, intent(in) :: k
8686
!! We want the kth smallest entry. E.G. `k=1` leads to
8787
!! `kth_smallest=min(a)`, and `k=size(a)` leads to
@@ -169,7 +169,7 @@ contains
169169
${inttype}$, intent(inout) :: indx(:)
170170
!! Array of indices into `a(:)`. Must contain each integer
171171
!! from `1:size(a)` exactly once. On output it will be partially
172-
!! "sorted" such that
172+
!! sorted such that
173173
!! `all( a(indx(1:(k-1)))) <= a(indx(k)) ) .AND.
174174
!! all( a(indx(k)) <= a(indx( (k+1):size(a) )) )`.
175175
${inttype}$, intent(in) :: k

0 commit comments

Comments
 (0)