[−][src]Trait rand::distributions::weighted::alias_method::Weight
Trait that must be implemented for weights, that are used with
WeightedIndex. Currently no guarantees on the correctness of
WeightedIndex are given for custom implementations of this trait.
Associated Constants
const MAX: Self[src]
Maximum number representable by Self.
const ZERO: Self[src]
Element of Self equivalent to 0.
Required methods
fn try_from_u32_lossy(n: u32) -> Option<Self>[src]
Produce an instance of Self from a u32 value, or return None if
out of range. Loss of precision (where Self is a floating point type)
is acceptable.