Struct rand::distributions::Weighted [-] [+] [src]

pub struct Weighted<T> {
    pub weight: usize,
    pub item: T,
}

A value with a particular weight for use with WeightedChoice.

Fields

weight

The numerical weight of this item

item

The actual item which is being weighted