Skip to content

Commit 73010e2

Browse files
gareth-nxjvdp1
andauthored
Apply suggestions from code review
First batch of suggestions from jvdp1 Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
1 parent 8cc6129 commit 73010e2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

doc/specs/stdlib_selection.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Selection Procedures
88

99
## Overview of selection
1010

11-
Suppose you wish to find the value of the kth-smallest entry in an array of size N, or
11+
Suppose you wish to find the value of the k-th smallest entry in an array of size N, or
1212
the index of that value. While it could be done by sorting the whole array
1313
using `[[stdlib_sorting(module):sort(interface)]]` or
1414
`[[stdlib_sorting(module):sort_index(interface)]]` from
@@ -31,23 +31,22 @@ for the kth-smallest value. This can be useful if you have previously called `se
3131
to find a smaller or larger rank (that will have led to partial sorting of
3232
`array`, thus implying some constraints on the location).
3333

34-
* `arg_select` is used to find the index of the kth-smallest entry of an array.
34+
* `arg_select` is used to find the index of the k-th smallest entry of an array.
3535
In this case the input array is not modified, but the user must provide an
3636
input index array with the same size as `array`, having unique indices from
3737
`1:size(array)`, which is modified instead. On return the index array is modified
3838
such that `all(array(index(1:k)) <= array(index(k)))` and `all(array(k) <= array(k+1:size(array)))`.
3939
The user can optionally specify `left` and `right` indices to constrain the search
40-
for the kth-smallest value. This can be useful if you have previously called `arg_select`
40+
for the k-th smallest value. This can be useful if you have previously called `arg_select`
4141
to find a smaller or larger rank (that will have led to partial sorting of
4242
`index`, thus implying some constraints on the location).
4343

4444
#### Licensing
4545

4646
The Fortran Standard Library is distributed under the MIT
47-
License. However components of the library may be based on code with
48-
additional licensing restrictions. In particular `select` and `arg_select`
47+
License. It is worth noting that `select` and `arg_select`
4948
were derived using some code from quickSelect in the Coretran library, by Leon Foks,
50-
https://github.com/leonfoks/coretran. Leon has given permission for the code here
49+
https://github.com/leonfoks/coretran. Leon Foks has given permission for the code here
5150
to be released under stdlib's MIT licence.
5251

5352
### Specifications of the `stdlib_selection` procedures

0 commit comments

Comments
 (0)