@@ -8,7 +8,7 @@ title: Selection Procedures
8
8
9
9
## Overview of selection
10
10
11
- Suppose you wish to find the value of the kth-smallest entry in an array, or
11
+ Suppose you wish to find the value of the kth-smallest entry in an array of size N , or
12
12
the index of that value. While it could be done by sorting the whole array
13
13
using ` [[stdlib_sorting(module):sort(interface)]] ` or
14
14
` [[stdlib_sorting(module):sort_index(interface)]] ` from
@@ -122,7 +122,7 @@ we need to search.
122
122
123
123
` right ` (optional): shall be a scalar with the same type as ` k ` . It is an ` intent(in) `
124
124
argument. If specified then we assume the k-th smallest value is definitely contained
125
- in ` array(1:right) ` . If not present it is ` size(a ) ` . This is typically useful if multiple calls
125
+ in ` array(1:right) ` . If not present it is ` size(array ) ` . This is typically useful if multiple calls
126
126
to ` select ` are made, because the partial sorting of ` array ` implies constraints on where
127
127
we need to search.
128
128
@@ -192,7 +192,7 @@ Generic subroutine.
192
192
the array in which we search for the kth smallest entry.
193
193
194
194
` indx ` : shall be a rank one array with the same size as ` array ` , containing all integers
195
- from ` 1:size(a ) ` in any order. It is of any of the types:
195
+ from ` 1:size(array ) ` in any order. It is of any of the types:
196
196
` integer(int8) ` , ` integer(int16) ` , ` integer(int32) ` , ` integer(int64) ` . It is an
197
197
` intent(inout) ` argument. On return its elements will define a partial sorting of ` array(:) ` such that:
198
198
` all( array(indx(1:k-1)) <= array(indx(k)) ) ` and ` all(array(indx(k)) <= array(indx(k+1:size(array)))) ` .
0 commit comments