You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/specs/stdlib_selection.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ title: Selection Procedures
10
10
11
11
Suppose you wish to find the value of the kth-smallest entry in an array, or
12
12
the index of that value. While it could be done by sorting the whole array
13
-
using `sort` or `sort_index` from `stdlib_sorting` and then finding the k-th
13
+
using `[[stdlib_sorting(module):sort(interface)]]` or `[[stdlib_sorting(module):sort_index(interface)]]` from `[[stdlib_sorting(module)]]` and then finding the k-th
14
14
entry, that would require O(N x LOG(N)) time. However selection of a single
15
-
entry can be done in O(N) time, so is much faster for large arrays. This is
15
+
entry can be done in O(N) time, which is much faster for large arrays. This is
16
16
useful, for example, to quickly find the median of an array, or some other
17
17
percentile.
18
18
@@ -28,7 +28,7 @@ such that `all(array(1:k) <= array(k)))` and `all(array(k) <= array((k+1):size(
28
28
The user can optionally specify `left` and `right` indices to constrain the search
29
29
for the kth-smallest value. This can be useful if you have previously called `select`
30
30
to find a smaller or larger rank (that will have led to partial sorting of
31
-
`array`, thus implying some constraint on the location).
31
+
`array`, thus implying some constraints on the location).
32
32
33
33
*`arg_select` is used to find the index of the kth-smallest entry of an array.
34
34
In this case the input array is not modified, but the user must provide an
@@ -38,7 +38,7 @@ such that `all(array(index(1:k)) <= array(index(k)))` and `all(array(k) <= array
38
38
The user can optionally specify `left` and `right` indices to constrain the search
39
39
for the kth-smallest value. This can be useful if you have previously called `arg_select`
40
40
to find a smaller or larger rank (that will have led to partial sorting of
41
-
`index`, thus implying some constraint on the location).
41
+
`index`, thus implying some constraints on the location).
42
42
43
43
#### Licensing
44
44
@@ -47,7 +47,7 @@ License. However components of the library may be based on code with
47
47
additional licensing restrictions. In particular `select` and `arg_select`
48
48
were derived by modifying a matlab implementation of "qselect" by Manolis
0 commit comments