Struct rand::distributions::Weighted
[−]
[src]
pub struct Weighted<T> {
pub weight: usize,
pub item: T,
}Unstable (
rand): use rand from crates.io
A value with a particular weight for use with WeightedChoice.
Fields
weight: usize
Unstable (
rand): use rand from crates.io
The numerical weight of this item
item: T
Unstable (
rand): use rand from crates.io
The actual item which is being weighted