@@ -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
1212the index of that value. While it could be done by sorting the whole array
1313using ` [[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
3131to 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.
3535In this case the input array is not modified, but the user must provide an
3636input 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
3838such that ` all(array(index(1:k)) <= array(index(k))) ` and ` all(array(k) <= array(k+1:size(array))) ` .
3939The 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 `
4141to 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
4646The 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 `
4948were 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
5150to be released under stdlib's MIT licence.
5251
5352### Specifications of the ` stdlib_selection ` procedures
0 commit comments