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