pub struct WithoutReplacement<'a> { /* private fields */ }Expand description
Draws from a WeightedIndex without repeating an index.
Weighted and uniform draws share the same exclusions. Dropping a sequence over a borrowed index
restores its original weights in O(k log n) time, where k is the number of draws after the
first. A sequence that owns its index discards it.
Implementations§
Trait Implementations§
Source§impl Drop for WithoutReplacement<'_>
impl Drop for WithoutReplacement<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for WithoutReplacement<'a>
impl<'a> Freeze for WithoutReplacement<'a>
impl<'a> RefUnwindSafe for WithoutReplacement<'a>
impl<'a> Send for WithoutReplacement<'a>
impl<'a> Sync for WithoutReplacement<'a>
impl<'a> Unpin for WithoutReplacement<'a>
impl<'a> UnsafeUnpin for WithoutReplacement<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more