Skip to content

Commit 54c50e3

Browse files
committed
Fix doc for fn IndexedRandom::choose_multiple_weighted
Note that #1476 is solved and the nightly-only branch was stabilised, already before the last release.
1 parent 31f6a03 commit 54c50e3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/seq/slice.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,15 +183,8 @@ pub trait IndexedRandom: Index<usize> {
183183
/// likelihood `weight(x)`. The probability of each item being selected is
184184
/// therefore `weight(x) / s`, where `s` is the sum of all `weight(x)`.
185185
///
186-
/// This implementation uses `O(length + amount)` space and `O(length)` time
187-
/// if the "nightly" feature is enabled, or `O(length)` space and
188-
/// `O(length + amount * log length)` time otherwise.
189-
///
190-
/// # Known issues
191-
///
192-
/// The algorithm currently used to implement this method loses accuracy
193-
/// when small values are used for weights.
194-
/// See [#1476](https://github.com/rust-random/rand/issues/1476).
186+
/// This implementation uses `O(length + amount)` space and `O(length)` time.
187+
/// See [`index::sample_weighted`] for details.
195188
///
196189
/// # Example
197190
///

0 commit comments

Comments
 (0)