Skip to content

Commit bdc8c3a

Browse files
Updated docs.
1 parent 744a427 commit bdc8c3a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/impl_1d.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ impl<A, S> ArrayBase<S, Ix1>
2727
}
2828
}
2929

30-
/// Return the element that would occupy the `i`-th position if the array
31-
/// were sorted in increasing order.
30+
/// Return the element that would occupy the `i`-th position if
31+
/// the array were sorted in increasing order.
3232
///
3333
/// The array is shuffled **in place** to retrieve the desired element:
3434
/// no copy of the array is allocated.
35-
/// No assumptions should be made on the ordering of elements
36-
/// after this computation.
35+
/// After the shuffling, all elements with an index smaller than `i`
36+
/// are smaller than the desired element, while all elements with
37+
/// an index greater or equal than `i` are greater than or equal
38+
/// to the desired element.
39+
///
40+
/// No other assumptions should be made on the ordering of the
41+
/// elements after this computation.
3742
///
3843
/// Complexity ([quickselect](https://en.wikipedia.org/wiki/Quickselect)):
3944
/// - average case: O(`n`);

0 commit comments

Comments
 (0)