pub struct Categorical<T: Clone, ElemD: Distribution<usize> + Clone> {
pub elements: Vec<T>,
pub ed: ElemD,
}Expand description
A categorical distribution that selects from elements based on an index distribution ed.
Fields§
§elements: Vec<T>§ed: ElemDTrait Implementations§
Source§impl<T: Clone + Clone, ElemD: Clone + Distribution<usize> + Clone> Clone for Categorical<T, ElemD>
impl<T: Clone + Clone, ElemD: Clone + Distribution<usize> + Clone> Clone for Categorical<T, ElemD>
Source§fn clone(&self) -> Categorical<T, ElemD>
fn clone(&self) -> Categorical<T, ElemD>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Clone, ElemD: Distribution<usize> + Clone> Distribution<T> for Categorical<T, ElemD>
impl<T: Clone, ElemD: Distribution<usize> + Clone> Distribution<T> for Categorical<T, ElemD>
Auto Trait Implementations§
impl<T, ElemD> Freeze for Categorical<T, ElemD>where
ElemD: Freeze,
impl<T, ElemD> RefUnwindSafe for Categorical<T, ElemD>where
ElemD: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, ElemD> Send for Categorical<T, ElemD>
impl<T, ElemD> Sync for Categorical<T, ElemD>
impl<T, ElemD> Unpin for Categorical<T, ElemD>
impl<T, ElemD> UnwindSafe for Categorical<T, ElemD>where
ElemD: UnwindSafe,
T: UnwindSafe,
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