File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -275,9 +275,10 @@ where
275275 }
276276}
277277
278- /// Trait that must be implemented for weights, that are used with
279- /// [`WeightedAliasIndex`]. Currently no guarantees on the correctness of
280- /// [`WeightedAliasIndex`] are given for custom implementations of this trait.
278+ /// Weight bound for [`WeightedAliasIndex`]
279+ ///
280+ /// Currently no guarantees on the correctness of [`WeightedAliasIndex`] are
281+ /// given for custom implementations of this trait.
281282pub trait AliasableWeight :
282283 Sized
283284 + Copy
Original file line number Diff line number Diff line change @@ -282,10 +282,12 @@ where
282282 }
283283}
284284
285- /// Randomly sample exactly `amount` distinct indices from `0..length`, and
286- /// return them in an arbitrary order (there is no guarantee of shuffling or
287- /// ordering). The weights are to be provided by the input function `weights`,
288- /// which will be called once for each index.
285+ /// Randomly sample exactly `amount` distinct indices from `0..length`
286+ ///
287+ /// Results are in arbitrary order (there is no guarantee of shuffling or
288+ /// ordering).
289+ ///
290+ /// Function `weight` is called once for each index to provide weights.
289291///
290292/// This method is used internally by the slice sampling methods, but it can
291293/// sometimes be useful to have the indices themselves so this is provided as
You can’t perform that action at this time.
0 commit comments