pub struct DiscreteAliasUrn { /* private fields */ }Expand description
Walker’s alias method (SciPy’s DiscreteAliasUrn, Vose’s construction): after O(n) set-up,
each variate costs one uniform and one comparison. Each of n equally likely columns holds its
own outcome with some probability and an alias otherwise.
Implementations§
Trait Implementations§
Source§impl Clone for DiscreteAliasUrn
impl Clone for DiscreteAliasUrn
Auto Trait Implementations§
impl Freeze for DiscreteAliasUrn
impl RefUnwindSafe for DiscreteAliasUrn
impl Send for DiscreteAliasUrn
impl Sync for DiscreteAliasUrn
impl Unpin for DiscreteAliasUrn
impl UnsafeUnpin for DiscreteAliasUrn
impl UnwindSafe for DiscreteAliasUrn
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